Consider the following truth table of a logic gate with A and B as inputs and Y as output:
| Input A | Input B | Output Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The above truth table belongs to:
- ANOR gate
- BOR gate
- CNAND gate
- DAND gate
Show answer and explanation
Correct answer: (c) NAND gate
Explanation
The output is 0 only when both inputs are 1, and 1 in every other case. That is the NAND gate (NOT-AND): it gives the opposite of an AND gate.
- AND: output 1 only when both inputs are 1.
- OR: output 0 only when both inputs are 0.
- NOR: output 1 only when both inputs are 0.
NAND and NOR are called universal gates, because any other logic gate can be built from either of them alone.