Question
Write the truth tables and Boolean expressions for the five basic logic gates: AND, OR, NOT, NAND, and NOR. Explain why NAND and NOR are called universal gates.
(NCERT Class 12, Chapter 14)
Solution — Step by Step
AND Gate: Output is 1 only when both inputs are 1.
| A | B | Y = A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR Gate: Output is 1 when at least one input is 1.
| A | B | Y = A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT Gate: Output is the complement of the input. .
| A | Y |
|---|---|
| 0 | 1 |
| 1 | 0 |
NAND Gate (NOT + AND):
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOR Gate (NOT + OR):
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
A gate is universal if it alone can be used to build AND, OR, and NOT gates (and therefore any logic circuit).
NAND as universal:
- NOT: Connect both inputs of NAND together →
- AND: NAND followed by NOT (another NAND with tied inputs)
- OR: Apply NOT to each input, then NAND
NOR as universal: Similarly, NOR alone can implement all three basic gates.
Since any Boolean function can be built from AND, OR, NOT — and these can be built from NAND (or NOR) alone — NAND and NOR are universal.
Why This Works
Logic gates are the building blocks of all digital circuits — from calculators to smartphones. Each gate implements a simple Boolean operation on binary inputs (0 or 1). By combining these gates, we can build circuits that perform arithmetic, store data, and make decisions.
The universality of NAND gates is why they dominate IC manufacturing — a single type of gate can implement any logic function, simplifying production.
Alternative Method — De Morgan’s Theorems for Quick Conversions
For JEE/CBSE, memorise De Morgan’s theorems cold. They let you convert any NAND/NOR expression into AND/OR form instantly. The most common exam question: “Identify the equivalent gate” — where they give a combination of NAND/NOR gates and ask what single gate it implements.
Common Mistake
Students swap the truth tables of NAND and NOR. Quick check: NAND gives 0 only when both inputs are 1 (it’s the opposite of AND). NOR gives 1 only when both inputs are 0 (it’s the opposite of OR). If you remember “NAND = inverted AND” and “NOR = inverted OR”, you’ll never mix them up.