Question:hard

Consider the digital circuit shown below with two input lines A and B, two select lines S0 and S1, and an output line Y. The blocks Q and M represent an active high 2:4 decoder and a 4-to-1 multiplexer, respectively. Out of 16 possible input combinations, the number of combinations that produce Y=1 is ______.

Note: One input combination is an instance of [A B S1 S0].

Show Hint

Write the decoder outputs D0=A'B' and D3=AB, note that mux inputs 1 and 2 are hardwired to 0 and 1, then count, separately for each S1S0 setting, how many of the 4 A,B combinations give Y=1.
Updated On: Jul 22, 2026
Show Solution

Correct Answer: 6

Solution and Explanation

Step 1: Understand what the mux is really doing.
The select pair $S1S0$ just chooses one of four sources for $Y$: source $00$ is $D0$ from the decoder, source $01$ is hardwired low, source $10$ is hardwired high, and source $11$ is $D3$ from the decoder. So the circuit behaves like a switch with four settings.

Step 2: Handle the two hardwired settings first, since they do not depend on A, B at all.
When $S1S0=01$, $Y$ is stuck at $0$ no matter what A and B are, contributing $0$ winning rows. When $S1S0=10$, $Y$ is stuck at $1$ no matter what A and B are, contributing all $4$ rows, since there are $4$ combinations of A and B.

Step 3: Handle the two decoder-driven settings.
When $S1S0=00$, $Y$ copies $D0$, which the decoder makes $1$ only for the single input pair $A=0,B=0$. That is $1$ winning row out of $4$.
When $S1S0=11$, $Y$ copies $D3$, which is $1$ only for $A=1,B=1$. That is again $1$ winning row out of $4$.

Step 4: Add every winning row across all four settings of S1S0.
$0 \text{ (from } 01\text{)} + 4 \text{ (from } 10\text{)} + 1 \text{ (from } 00\text{)} + 1 \text{ (from } 11\text{)} = 6$

Step 5: Sanity check against the total.
There are $16$ total rows ($4$ values of A,B times $4$ values of S1,S0), and only $6$ of them make $Y=1$, a bit more than a third, matching the mix of one constant-1 branch and two single-hit decoder branches.
\[ \boxed{6} \]
Was this answer helpful?
0


Questions Asked in GATE CS exam