retagged by
7,105 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
retagged by

4 Answers

Best answer
44 votes
44 votes

$\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
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)

 

Answer:

Related questions

37 votes
37 votes
11 answers
2