Amateur Extra Question E7A07
E7A: Digital circuits: digital circuit principles and logic circuits; classes of logic elements; positive and negative logic; frequency dividers; truth tables
What logical operation does a NAND gate perform?
- It produces a 0 at its output only if all inputs are 0
- It produces a 1 at its output only if all inputs are 1
- It produces a 0 at its output if some but not all inputs are 1
- It produces a 0 at its output only if all inputs are 1 (correct answer)
Correct answer: D, It produces a 0 at its output only if all inputs are 1
Explanation
NAND means NOT-AND: the gate performs AND and then inverts the result. AND outputs 1 only when every input is 1, so NAND outputs 0 only in that one case and 1 for every other input combination. The two-input truth table is 00→1, 01→1, 10→1, 11→0. NAND is called a universal gate because any logic function can be built from NAND gates alone.
Why the other answers are wrong
- A, It produces a 0 at its output only if all inputs are 0: "0 only if all inputs are 0" describes an OR gate; a NAND gate outputs 1 when all inputs are 0.
- B, It produces a 1 at its output only if all inputs are 1: "1 only if all inputs are 1" is a plain AND gate; NAND is its inverse and gives 0 in that case.
- C, It produces a 0 at its output if some but not all inputs are 1: A 0 output for mixed inputs is how a two-input XNOR behaves; a NAND gate outputs 1 whenever any input is 0.