Two 4 bits binary numbers, and are given in the inputs of a logic circuit shown in figure below. The output will be :
- Option A:
- Option B:
- Option C:
- Option D:
Solution
Core idea. Reduce the circuit to one Boolean expression before putting in the bits.
Concept refresher. A NOT gate gives , and a NAND gate gives the inverse of AND, . De Morgan's law turns an inverted product into a sum:
and a double inversion cancels, .
Picture the situation. Working bit by bit, from the inputs through the NOT and the AND to the final inversion:
Approach. Write the circuit's Boolean expression, simplify it, and apply it to each of the four bit positions.
Step 1: Expression of the circuit
The NAND gate receives and , so its output is
Step 2: Apply it bit by bit
Inverting gives . Taking OR with position by position:
(each position is if either bit is ).
Answer. (A)
Sanity check. The direct route gives the same: , , and inverting gives .
Why the other options are wrong
- (B) is , the AND before the output bubble; the NAND gate inverts it to .
- (C) is , which an exclusive OR gate would give; the circuit has a NOT gate and a NAND gate, not an XOR gate.
- (D) is , the plain AND of the inputs; it ignores both the NOT gate on and the output bubble.
Key takeaway
The trap. Overlooking the output bubble of the NAND gate, which leaves .
How toppers think. They use De Morgan's law to get and read the answer off in seconds.
Remember. .
More on Semiconductors
- The output Y for the given inputs A and B to the circuit is:
- The maximum rated power of the LED is 2 mW and it is used in the circuit with input voltage of 5 V as shown…
- Refer to the logic circuit given below. For two inputs (A = 1, B = 1) and (A = 0, B = 1), output (Y) will be…
- All 145 on Semiconductors ›