in Digital Logic retagged by
7,125 views
28 votes
28 votes

Consider the following combinational function block involving four Boolean variables $x,\:y,\:a,\:b$ where $x,\:a,\:b$ are inputs and $y$ is the output.

f(x, a, b, y)
{
    if(x is 1) y = a;
    else y = b;
}

Which one of the following digital logic blocks is the most suitable for implementing this function?

  1. Full adder
  2. Priority encoder
  3. Multiplexor
  4. Flip-flop
in Digital Logic retagged by
7.1k views

4 Answers

44 votes
44 votes
Best answer

$\text{If} \qquad X=1 \qquad Y=a;$
$\text{else}\quad (X=0)\qquad Y = b;$

$\text{Input}: (a,b,X)\qquad\qquad \text{Output}: Y$

$Y = \bar X b + Xa.$

Correct Answer: $C$

edited by

4 Comments

@rahul+sharma+5

Can we implement it using priority encoder ???

2 X 1 Priority encoder

Input (No use)        X  Output (Y)
$\phi$       1  a
$\phi$       0     b 

 

0
0
Same doubt.
0
0
edited by

@jatin khachane 1

1. x,a,b are the inputs.

2. y is output.

a,b will be given to Encoder but how will you check if condition?

0
0
17 votes
17 votes
2X1 multiplexer
4 votes
4 votes
lovely question x1=a x0=b MULTIPLEXER
0 votes
0 votes

Below truth table can be formed by seeing the code

X  a  b  y

0  0  0  0

0  0  1  1

0  1  0  0

0  1  1  1

1  0  0  0

1  0  1  0

1  1  0  1

1  1  1  1

$y= a’bx’ +  abx’ + ab’x + abx$

minimize this we get

$y = x’b(a’+a) + xa(b+b’)$

$y = x’b + xa$

 now it can be easily implemented by 2 X 1 MUX as:

Answer Option(C)

 

by
Answer:

Related questions