FutureLogic Blog → Boolean Logic → IGCSE 0478

How do NAND, NOR and XOR logic gates work?

NAND reverses AND, NOR reverses OR, and XOR produces 1 when its two inputs are different.

Learn syllabus sections 10.5–10.7 through clear gate symbols, complete truth tables, worked examples and original exam practice.

What are NAND, NOR and XOR gates?

Each accepts two binary inputs and produces one binary output. NAND and NOR invert the output of AND and OR respectively. XOR checks whether the inputs are different.

NAND: NOT AND. NOR: NOT OR. XOR: different inputs.

Cambridge syllabus focus

Sections 10.5, 10.6 and 10.7. The foundational NOT, AND and OR operations are covered in Blog 1 (link activates after publication).

10.5 — How does NAND work?

NAND gives 0 only when both inputs are 1. Its AND-shaped symbol has a small output inversion circle.

ABX
NAND gate — A and B inputs, X output
X = NOT (A AND B)
ABNAND
001
011
101
110

Check your understanding

Calculate 1 NAND 1.

Reveal answer

0 — AND is 1, then invert.

10.6 — How does NOR work?

NOR gives 1 only when both inputs are 0. Its OR-shaped symbol has a small output inversion circle.

ABX
NOR gate — A and B inputs, X output
X = NOT (A OR B)
ABNOR
001
010
100
110

Check your understanding

Calculate 0 NOR 0.

Reveal answer

1 — OR is 0, then invert.

10.7 — How does XOR work?

XOR gives 1 when exactly one input is 1. Its symbol resembles OR but has an extra curved line on the input side, not an inversion circle.

ABX
XOR gate — A and B inputs, X output
X = A XOR B
ABXOR
000
011
101
110

Check your understanding

Calculate 1 XOR 1.

Reveal answer

0 — the inputs are equal.

Compare the three gates

Compare NAND, NOR and XOR against AND and OR for the same input combinations.

ABANDNANDORNORXOR
0001010
0101101
1001101
1110100
Exam tip: OR is 1 for inputs 11, but XOR is 0. XOR requires different inputs.

Worked example 1 — NAND then XOR

For X = (A NAND B) XOR C, first calculate P = A NAND B. Then XOR P with C. Three inputs require eight rows.

ABCP = A NAND BX = P XOR C
00011
00110
01011
01110
10011
10110
11000
11101

For A = 1, B = 1 and C = 0, P = 0 and X = 0.

Worked example 2 — NOR then NAND

For X = (A NOR B) NAND C, first calculate Q = A NOR B, then NAND Q with C.

ABCQ = A NOR BX = Q NAND C
00011
00110
01001
01101
10001
10101
11001
11101

Examiner insights — February/March 2026

The Cambridge February/March 2026 Paper 2 Principal Examiner Report notes that most candidates drew good logic circuits and completed truth tables accurately in Question 7. Some candidates drew NOR and XOR symbols imprecisely, while a small number gave inverted outputs, possibly from an added or missed NOT.

FutureLogic advice: distinguish the output inversion circle from XOR's extra input-side curve, and calculate intermediate outputs. These observations apply to that exam series only.

Common exam mistakes

✗ Confusing XOR and OR.

1 XOR 1 = 0, but 1 OR 1 = 1.

✗ Missing an inversion.

For NAND and NOR, compute AND or OR first, then reverse.

✗ Drawing NOR like XOR.

NOR has an output circle; XOR has an extra input-side curve.

✗ Skipping intermediate columns.

Calculate each gate separately in a multi-gate circuit.

Original FutureLogic exam-style practice

Original questions, not official Cambridge examination questions. Suggested marks are indicative.

Question 1 (2 marks)

Explain how NAND differs from AND.

Reveal model answer

NAND inverts AND (1); it outputs 0 only when both inputs are 1 (1).

Question 2 (2 marks)

State and explain 0 NOR 0.

Reveal model answer

1 (1), because OR gives 0 and NOR reverses it (1).

Question 3 (4 marks)

Construct the four-row truth table for A XOR B.

Reveal model answer

For 00, 01, 10, 11 the outputs are 0, 1, 1, 0.

Question 4 (4 marks)

Complete a truth table for (A NAND B) XOR C with an intermediate column.

Reveal model answer

For 000, 001, 010, 011, 100, 101, 110, 111 the outputs are 1, 0, 1, 0, 1, 0, 0, 1.

Quick quiz

  1. Which gate is AND followed by NOT?
  2. When is NOR equal to 1?
  3. When is XOR equal to 1?
  4. What is 1 XOR 1?
  5. What distinguishes the XOR symbol?

Quiz answers

Reveal all answers
  1. NAND.
  2. Both inputs are 0.
  3. Inputs differ.
  4. 0.
  5. An extra curved line on the input side.

Final summary

NAND

NOT AND; 0 only for 11.

NOR

NOT OR; 1 only for 00.

XOR

1 only for 01 and 10.

Exam method

Accurate symbols; intermediate columns.

NAND: not both. NOR: neither. XOR: different.

Ready to practise Boolean logic?

Apply what you learned in the interactive Gates Lab.