A logic gate circuit has two inputs and and output . The voltage waveforms of , and are shown below. The logic gate circuit is
- Option A: AND gate
- Option B: OR gate
- Option C: NOR gate
- Option D: NAND gate
Solution
Core idea. Waveforms give the truth table interval by interval; high only when both inputs are high means AND.
Concept refresher. The waveforms of a gate are its truth table spread out in time: in each interval the levels of the inputs and of the output give one row. An AND gate has a high output only when both inputs are high,
An OR gate has a high output when at least one input is high, and NAND and NOR are the inverses of these.
Picture the situation. Run a vertical line across the three traces. Wherever Y is high, look up at A and B: both are high. Wherever either A or B is low, Y is low. The output is high only when the two inputs agree to be high.
Approach. Read off the rows of the truth table from the waveforms and compare with the four gates.
Step 1: Reading the waveforms
A has three pulses. B is high from the start of the first pulse of A until the start of the second, and again during the third. Y is high during the first and the third pulses of A only.
Step 2: Rows of the truth table
When A = 1 and B = 1, during the first and third pulses, Y = 1. When A = 0 and B = 1, between the first two pulses, Y = 0. When A = 1 and B = 0, during the second pulse, Y = 0. When both are 0, Y = 0.
Step 3: The gate
The output is 1 only when both inputs are 1, so the circuit is an AND gate.
Answer. (A) AND gate
Sanity check. During the second pulse of A the output stays low although A is high, which already rules out an OR gate.
Why the other options are wrong
- (B) An OR gate would be high during the second pulse of A, where B is low; Y is low there.
- (C) A NOR gate would be high where both inputs are low, at the start and the end; Y is low there.
- (D) A NAND gate would be low during the first and third pulses of A, where both inputs are high; Y is high there.
Key takeaway
The trap. Use the intervals in which the two inputs differ to tell AND from OR.
How toppers think. They look at where the output is high and read the inputs there.
Remember. : high only when both are high.
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 ›