In the digital circuit shown in the figure, for the given inputs the P and Q values are :
- Option A: ,
- Option B: ,
- Option C: ,
- Option D: ,
Solution
Core idea. For fixed inputs, write a 0 or a 1 at every gate output and move from left to right.
Concept refresher. A NAND gate gives a low output only when all its inputs are high, and an OR gate gives a low output only when all its inputs are low. An AND gate gives a high output only when all its inputs are high, and a NOR gate only when all its inputs are low. A NOT gate inverts its input. By De Morgan's theorem, an OR gate fed with two inverted signals gives the same output as a NAND gate fed with the signals themselves:
Picture the situation. With both inputs at 1, the NAND gate at the top gives 0. The two NOT gates at the bottom turn the inputs into 0 and 0, so the OR gate gives 0 as well. P is the AND of two zeros. For Q, the 0 from the NAND gate is first flipped to 1, and a NOR gate with a 1 at an input gives 0.
Approach. Write the level at the output of each gate, from the inputs to P and Q.
Step 1: The NAND gate
Its two inputs are 1 and 1, so its output is .
Step 2: The OR gate
Each input passes through a NOT gate first and becomes 0, so the OR gate gives .
Step 3: Output P
The AND gate receives the NAND output and the OR output, so .
Step 4: Output Q
The NAND output passes through a NOT gate and becomes 1. The NOR gate receives this 1 and the 0 from the OR gate:
Answer. (B) ,
Sanity check. In general the NAND gate and the OR gate both give here, so the NOR gate receives a signal and its inverse and Q is 0 for any inputs.
Why the other options are wrong
- (A) With inputs 1 and 1 the NAND gate gives 0, so the AND gate cannot give P = 1; and Q is 0 as well.
- (C) P = 0 is right, but Q = 1 would need both inputs of the NOR gate to be 0, and the inverted NAND output is 1.
- (D) Q = 0 is right, but P = 1 would need the OR gate to give 1; it receives the two inverted inputs, 0 and 0.
Key takeaway
The trap. A small NOT gate tucked between two gates is easy to miss and flips the result.
How toppers think. They notice that the NOR gate here receives a signal and its inverse, so Q is 0 whatever the inputs.
Remember. , so its NOR is 0.
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 ›