← IGCSE Computer Science Paper 2

Common mistakes with logic gates, expressions and truth tables

Mixing up NAND/AND or OR/XOR, rows out of binary order, NOT on the wrong part, missing brackets or columns, wrong input counts, or simplifying a circuit that must be drawn as given.

Understanding Common mistakes with logic gates, expressions and truth tables in IGCSE Computer Science Paper 2

What it does: The row where both inputs are 1 is the only row where OR and XOR differ, so check it carefully. Working out (A AND B) in its own column first means each gate is solved separately, so mistakes are less likely. The student has described AND. NAND is NOT AND, so its output is the opposite: 0 only when A = 1 and B = 1, and 1 for every other row. Rows must follow binary counting order: 00, 01, 10, 11. Rows out of order make the table hard to check and can lose marks. NOT (A AND B) inverts the whole result, which is a NAND. Writing NOT directly in front of A (with brackets) makes it apply only to A.

Common mistakes: NAND is the opposite of AND. It outputs 1 unless both inputs are 1, so the row 0 1 must give X = 1. Writing 0 treats the gate as AND. XOR outputs 1 only when the inputs are different. When both inputs are 1, XOR gives 0. Giving 1 is the OR gate's behaviour.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 562–580) and word search (Modules 539–580).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A student says the NAND gate outputs 1 only when both inputs are 1. What is the correct statement?
NAND outputs 0 only when both inputs are 1NAND outputs 1 only when both inputs are 1
Matches
X = NOT A AND B (meant NOT of the whole A AND B)
↓
NOT is applied to the wrong part: it only inverts A, not (A AND B). Brackets are missing
Applying
Meanings
Term
common logic mistakes
Meaning
Mixing up NAND/AND or OR/XOR, rows out of binary order, NOT on the wrong part, missing brackets or columns, wrong input counts, or simplifying a circuit that must be drawn as given.
Practice
X = NOT (A AND B)
Testing
Gaps
X = (A AND B)
Check Answer
Spots
30 0 1
40 1 0

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Roadrunner' badge — Streak Runner, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A student says the NAND gate outputs 1 only when both inputs are 1. What is the correct statement?
A. NAND outputs 0 only when both inputs are 1 ✓
B. NAND outputs 1 only when both inputs are 1
The student has described AND. NAND is NOT AND, so its output is the opposite: 0 only when A = 1 and B = 1, and 1 for every other row.
2. For inputs A = 1 and B = 1, which gate gives output 0 but is often confused with OR?
A. XOR ✓
B. OR
OR gives 1 when both inputs are 1. XOR gives 1 only when the inputs are different, so for 1 and 1 its output is 0.
3. A two-input truth table has its rows written in the order 00, 10, 01, 11. Is this correct?
A. Yes, any order of rows is fine
B. No, the order should be 00, 01, 10, 11 ✓
Rows must follow binary counting order: 00, 01, 10, 11. Rows out of order make the table hard to check and can lose marks.
4. Which expression correctly shows that NOT applies only to A in an AND with B?
A. X = NOT (A AND B)
B. X = (NOT A) AND B ✓
NOT (A AND B) inverts the whole result, which is a NAND. Writing NOT directly in front of A (with brackets) makes it apply only to A.
5. A student writes X = A AND B OR C for a circuit where A and B go into an AND gate and its output goes into an OR gate with C. What is the best fix?
A. X = (A AND B) OR C ✓
B. X = A AND (B OR C)
Brackets show which gate comes first. The AND gate is fed by A and B, so they must be bracketed before the OR with C. The other version describes a different circuit.

Match the Pairs

X = NOT (A AND B) but written as X = A AND B → NAND confused with AND: the output is not inverted, so the truth table is wrong
Rows in order: 00, 01, 11, 10 → Rows out of binary order: 11 is placed before 10, so the table should run 00, 01, 10, 11
OR gives 1 when both inputs are 1, but XOR gives 0 in that row, so they must not be confused → A=1, B=1: A OR B = 1 but A XOR B = 0
Intermediate columns for each gate help you avoid errors when completing a truth table with several gates → A B C | (A AND B) | X = (A AND B) OR C
X = NOT A AND B (meant NOT of the whole A AND B) → NOT is applied to the wrong part: it only inverts A, not (A AND B). Brackets are missing
A NOT gate drawn with two inputs, A and B → Wrong number of inputs: a NOT gate has exactly one input

Key Term

common logic mistakes
Mixing up NAND/AND or OR/XOR, rows out of binary order, NOT on the wrong part, missing brackets or columns, wrong input counts, or simplifying a circuit that must be drawn as given.

Fill in the Blanks

1. X = NOT (A AND B) // This is NAND, not AND
Hint: Type the gate placed in front of the brackets to turn AND into NAND.
2. X = A XOR B // Output is 0 when A=1 and B=1
Hint: Type the gate that outputs 0 when both inputs are 1, unlike OR.
3. 0 0 1 0 1 0 0 1 1
Hint: Type the value of C in the second row, counting up in binary order.
4. Column P = A AND B Column X = P OR C
Hint: Type the name of the intermediate column used later to work out X.
5. NOT gate: 1 input, 1 output AND gate: 2 inputs, 1 output
Hint: Type the number of inputs a NOT gate has.

Spot the Error

Question 1
A X = A NAND B
B A B X
C 0 0 1
D 0 1 0
E 1 0 1
F 1 1 0
Line D — NAND is the opposite of AND. It outputs 1 unless both inputs are 1, so the row 0 1 must give X = 1. Writing 0 treats the gate as AND.
Question 2
A Gate: XOR
B A=1, B=1 gives X=1
C A=1, B=0 gives X=1
D A=0, B=0 gives X=0
Line B — XOR outputs 1 only when the inputs are different. When both inputs are 1, XOR gives 0. Giving 1 is the OR gate's behaviour.
Question 3
A X = NOT A B
B A X
C 0 1
D 1 0
Line A — A NOT gate has exactly one input. The expression must be X = NOT A, matching the single input column A in the table.
Question 4
A A B X
B 1 0 0
C 0 1 0
D 1 0 0
E 1 1 1
Line B — Truth table rows must follow binary counting order, starting at 0 0. The first row must be 0 0 0. Starting with 1 0 puts the rows out of order and leaves out 0 0.
Question 5
A A = rain, B = wind
B Alarm when not both are true
C X = NOT A AND B
D Same as A NAND B
Line C — NOT must apply to the whole bracket (A AND B). Without the brackets, NOT only changes A, which gives a different expression. It should be X = NOT (A AND B).

Student with a class code? Join your class →