Logic Gates — AND, OR, NOT Truth Tables

easy CBSE NCERT Class 12 4 min read

Question

Draw the truth tables for AND, OR, and NOT gates. Also explain why NAND and NOR are called universal gates.


Solution — Step by Step

The NOT gate has one input and one output. It simply inverts the input signal.

Input AOutput Y = A’
01
10

Output is 1 only when all inputs are 1. Think of it as: “A AND B must both agree.”

Input AInput BOutput Y = A·B
000
010
100
111

Output is 1 when any input is 1. Only fails (gives 0) when both inputs are 0.

Input AInput BOutput Y = A+B
000
011
101
111

NAND = AND followed by NOT. The output is the complement of the AND output.

Input AInput BY = (A·B)‘
001
011
101
110

NOR = OR followed by NOT. Output is 1 only when both inputs are 0.

Input AInput BY = (A+B)‘
001
010
100
110

Why This Works

Every digital circuit in existence — phones, computers, calculators — is built from combinations of just these basic gates. The logic follows directly from Boolean algebra: AND is multiplication (0×1=0), OR is addition where 1+1=1, and NOT is complementation.

NAND and NOR are called universal gates because you can build ANY other gate using only NAND gates (or only NOR gates). This matters enormously in manufacturing — you only need to fabricate one type of transistor circuit, then combine copies of it to get whatever logic you need.

  • NOT A = A NAND A (connect both inputs together)
  • A AND B = (A NAND B) NAND (A NAND B)
  • A OR B = (A NAND A) NAND (B NAND B)

This is why NAND and NOR appear repeatedly in CBSE Class 12 questions — the NCERT explicitly asks students to derive AND, OR, NOT from NAND alone.


Alternative Method — Verifying Universality of NOR

We can build the three basic gates from NOR alone, just like we did with NAND:

  • NOT A = A NOR A
  • A OR B = (A NOR B) NOR (A NOR B)
  • A AND B = (A NOR A) NOR (B NOR B)

In board exams, “Show that NAND is a universal gate” typically means: draw the circuit diagrams for NOT, AND, and OR using only NAND gates with proper labelling. The truth table verification is a bonus that fetches full marks.


Common Mistake

Students confuse the NAND truth table with AND. They write NAND output as 0 for the first three rows and 1 for the last — exactly the AND table — forgetting the NOT step. NAND is the complement of AND. The only row where NAND gives 0 is when both inputs are 1 (i.e., A=1, B=1 → 0). Every other row gives 1.

A quick check: count the 1s. AND has one 1. NAND has three 1s. If your NAND table has only one 1, you’ve written AND by mistake.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next