← IGCSE Computer Science Paper 2

Words in a problem statement and the gates they describe

Words in a problem statement point to a gate: both/and = AND, either/or = OR, not = NOT, neither...nor = NOR, not both = NAND, only one of = XOR.

Understanding Words in a problem statement and the gates they describe in IGCSE Computer Science Paper 2

What it does: 'Neither ... nor' means both inputs are 0 to give 1, which is the NOR gate. 'Not both' describes NAND: the output is 1 for every input combination except 1 and 1. 'Either' or 'or' means at least one input must be 1, so use an OR gate. 'Only one of' or 'one or the other but not both' excludes the case where both are 1. That is XOR. The word 'both' (or 'and') joining two conditions points to an AND gate.

Common mistakes: The key word 'both' means both inputs must be 1, so the gate is AND, not OR. Line 3 should be 'Gate: AND'. 'Either' points to an OR gate. XOR would need wording like 'only one of' or 'but not both'. Line 3 should be 'Gate: OR'.

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
An alarm sounds when both the door sensor (A) and the window sensor (B) are triggered. Which gate fits?
ANDOR
Matches
'Only one of the two switches is on' -> X = A OR B
↓
'Only one of' excludes the case where both are on, but OR also gives 1 when both inputs are 1. It should be XOR.
Applying
Meanings
Term
key word = gate
Meaning
Words in a problem statement point to a gate: both/and = AND, either/or = OR, not = NOT, neither...nor = NOR, not both = NAND, only one of = XOR.
Practice
both A and B: X = A AND B
Testing
Gaps
X = A B
Check Answer
Spots
2Key word: both
3Gate: OR

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

The 'Space Turtle' badge — Speed in Zero-G, 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. An alarm sounds when both the door sensor (A) and the window sensor (B) are triggered. Which gate fits?
A. OR
B. AND ✓
The word 'both' means two conditions must be true together, so use an AND gate.
2. A light turns on if either switch A or switch B is on (or both). Which gate fits?
A. OR ✓
B. AND
'Either' or 'or' means at least one input must be 1, so use an OR gate.
3. A fan runs when neither the heater (A) nor the sunlight sensor (B) is on. Which gate fits?
A. NAND
B. NOR ✓
'Neither...nor' means the output is 1 only when both inputs are 0. That is a NOR gate.
4. A warning is shown when it is NOT true that both A and B are on. Which gate fits?
A. NAND ✓
B. NOR
'Not both' gives 0 only when both inputs are 1. That is a NAND gate.
5. An output is 1 when only one of A or B is on, but not both. Which gate fits?
A. XOR ✓
B. OR
'Only one of' or 'one or the other but not both' excludes the case where both are 1. That is XOR.

Match the Pairs

(A AND B) → X is 1 only when both A and B are 1, as in 'the alarm sounds only if both sensors are on'
(A OR B) → X is 1 when either A or B is 1, as in 'the light is on if either switch is pressed'
'The door stays locked only if neither the key nor the code is used' means the output is 1 only when both inputs are 0 → X = A NOR B
'The machine works unless both buttons are pressed together' means the output is 0 only when both inputs are 1 → X = A NAND B
'Only one of the two switches is on' -> X = A OR B → 'Only one of' excludes the case where both are on, but OR also gives 1 when both inputs are 1. It should be XOR.
'Neither sensor is triggered' -> X = A NAND B → 'Neither' needs both inputs to be 0 to give 1, but NAND gives 1 for 0,0, 0,1 and 1,0. It should be NOR.

Key Term

key word = gate
Words in a problem statement point to a gate: both/and = AND, either/or = OR, not = NOT, neither...nor = NOR, not both = NAND, only one of = XOR.

Fill in the Blanks

1. Problem: both A and B must be 1 X = A AND B
Hint: Type the gate name that the key word 'both' points to
2. Problem: either A or B is 1 X = A OR B
Hint: Type the gate name that the key word 'either' points to
3. Problem: neither A nor B is 1 X = A NOR B
Hint: Type the gate name for 'neither ... nor', meaning both inputs are 0
4. Problem: A and B are not both 1 X = A NAND B
Hint: Type the gate name for 'not both', the opposite of 'both'
5. Problem: only one of A or B is 1 X = A XOR B
Hint: Type the gate name for 'only one of' the inputs, but not both

Spot the Error

Question 1
A Alarm sounds if both A and B
B Key word: both
C Gate: OR
D X = A AND B
Line C — The key word 'both' means both inputs must be 1, so the gate is AND, not OR. Line 3 should be 'Gate: AND'.
Question 2
A Lamp on if either switch on
B Key word: either
C Gate: XOR
D X = A OR B
Line C — 'Either' points to an OR gate. XOR would need wording like 'only one of' or 'but not both'. Line 3 should be 'Gate: OR'.
Question 3
A Fan on if neither A nor B on
B Key words: neither ... nor
C Gate: NAND
D X = A NOR B
Line C — 'Neither ... nor' means the output is 1 only when both inputs are 0, which is a NOR gate. NAND matches 'not both'. Line 3 should be 'Gate: NOR'.
Question 4
A Buzzer if not both A and B on
B Key words: not both
C Gate: NAND
D X = A NOR B
Line D — 'Not both' is a NAND gate, so the expression must use NAND. NOR would mean 'neither ... nor'. Line 4 should be 'X = A NAND B'.
Question 5
A Pump runs if either A or B on
B Key word: both
C Gate: AND
Line A — The statement says 'either ... or', but the key word, gate and expression are for 'both' and AND. Line 1 should say 'both A and B'.

Student with a class code? Join your class →