Consider the circuit shown in the figure below: The circuit consists of NAND…
Consider the circuit shown in the figure below:

The circuit consists of NAND gates only. Then which one of the following options represents the output of the logic circuit?
Attempted by 72 students.
Show answer & explanation
The circuit simplifies to f = ¬(A·B).
Let x = NAND(A,B) = ¬(A·B).
The top second-stage NAND has both inputs as x, so its output is NAND(x,x) = ¬(x·x) = ¬x = A·B.
Let y = NAND(C,D) = ¬(C·D). The bottom second-stage NAND has inputs y and x, so its output is NAND(y,x) = ¬(y·x) = (C·D) + (A·B).
The final NAND takes inputs A·B and (C·D)+(A·B), so f = ¬((A·B)·((C·D)+(A·B))).
Simplify: (A·B)·((C·D)+(A·B)) = (A·B)·(C·D) + (A·B)·(A·B) = (A·B)·(C·D) + (A·B) = A·B. Thus, f = ¬(A·B).
Loading lesson…