The output from a NAND gate having inputs A and B given below will be:
- Option A: Diagram A
- Option B: Diagram B
- Option C: Diagram C
- Option D: Diagram D
Solution
Core idea. A NAND output is low only while every input is high.
Concept refresher. A NAND gate gives the inverse of the AND of its inputs:
Its output is 0 only when both inputs are 1, and 1 for the other three combinations. The output waveform is found by applying this rule in each interval of time between changes of the inputs.
Picture the situation. Lay the two input traces one above the other. Wherever at least one of them is low, the NAND output is high. Only in the stretches where both are high together does the output drop to low.
Approach. Find the intervals where both inputs are 1; the output is 0 there and 1 elsewhere.
Step 1: Reading the inputs
A is 1 before the first dotted line, 0 from the first line to the third, 1 from the third to the fifth, and 0 after the fifth. B is 1 before the first line and then changes at every line: 0, 1, 0, 1, 0, 1.
Step 2: Where both are 1
Both inputs are 1 before the first line, and again between the fourth and the fifth lines. In every other interval at least one of them is 0.
Step 3: The output
The output is 0 before the first line, 1 from the first line to the fourth, 0 between the fourth and the fifth, and 1 after the fifth. This is diagram B.
Answer. (B) Diagram B
Sanity check. Between the second and third lines A is 0 and B is 1, so the output must be high there; only diagram B and no other low-starting option keeps it high through that interval and the next.
Why the other options are wrong
- (A) It is low from the second line to the fourth, where the inputs are never both 1, so a NAND output must be high.
- (C) It is high before the first line and between the fourth and fifth lines, exactly where both inputs are 1 and the output must be low.
- (D) It is low between the second and third lines, where A is 0, and a NAND gate gives 1 whenever an input is 0.
Key takeaway
The trap. NAND is the inverse of AND: find the AND intervals and flip them.
How toppers think. They mark only the intervals where both inputs are high, and draw the output high everywhere else.
Remember. : 0 only for 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 ›