Consider the following logic circuit. The output is when :
- Option A: and
- Option B: and
- Option C: and
- Option D: and
Solution
Core idea. A NAND output is 0 only when all its inputs are 1; work backwards from that.
Concept refresher. A NAND gate gives the inverse of the AND of its inputs, , so its output is 0 only when and together. An AND gate gives 1 only when both its inputs are 1, an OR gate gives 1 when at least one input is 1, and a NOT gate inverts.
Picture the situation. The last gate is a NAND, and a NAND output goes low in one situation only: both of its inputs high. So both of the earlier gates must be giving 1. The upper one is an AND gate, which is very particular about when it gives 1, and that settles the inputs.
Approach. Require both inputs of the NAND gate to be 1 and find the inputs that achieve it.
Step 1: What the two gates compute
The upper gate is an AND gate with inputs and , giving . The lower gate is an OR gate with inputs and , giving .
Step 2: Condition for a low output
The NAND gate gives only if both of these are 1. needs and ; for these inputs as well. So when and .
Answer. (A) and
Sanity check. For each of the other three input pairs the AND gate gives 0, which by itself makes the NAND output 1.
Why the other options are wrong
- (B) For , the AND gate gives 0, so the NAND output is 1.
- (C) For , both the AND gate and the OR gate give 0, so the NAND output is 1.
- (D) For , the AND gate gives 0 although the OR gate gives 1, so the NAND output is 1.
Key takeaway
The trap. One input of a NAND at 0 is enough to make its output 1.
How toppers think. They start from the last gate and let it dictate what the earlier gates must give.
Remember. NAND gives 0 only for inputs 1 and 1.
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 ›