← IGCSE Computer Science Paper 2

Writing a logic expression from a logic circuit: one gate

Name the gate, then write X = with the input letters and the gate name, e.g. an AND gate with inputs A and B is X = A AND B. NOT has one input: X = NOT A.

Understanding Writing a logic expression from a logic circuit: one gate in IGCSE Computer Science Paper 2

What it does: Recognise the OR symbol, then write X = with both input letters and the gate name OR between them. NOT has only one input, so there is no B. The expression is X = NOT A. The gate name in the expression must match the gate in the circuit. An OR gate gives X = A OR B. The small circle on the output means the output is inverted. AND with a circle is NAND, so X = A NAND B. The correct expression is X = A AND B, because every expression begins with the output letter and an equals sign.

Common mistakes: An AND gate has two inputs, so the line should read 'Inputs: A and B'. The expression X = A AND B uses both letters. A flat-backed, D-shaped symbol with no bubble is an AND gate, not an OR gate. The line should be 'Gate: AND'.

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 AND gate has inputs A and B and output X. Which expression is correct?
A AND B = X ANDX = A AND B
Matches
X = A NOT
↓
NOT has one input and the gate name goes before the letter, so this is written the wrong way round.
Applying
Meanings
Term
X = A AND B
Meaning
Name the gate, then write X = with the input letters and the gate name, e.g. an AND gate with inputs A and B is X = A AND B. NOT has one input: X = NOT A.
Practice
X = NOT A
Testing
Gaps
X = A B
Check Answer
Spots
1Circuit: one AND gate
2Inputs: A only

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

The 'Bear' badge — Forest Guardian, 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 AND gate has inputs A and B and output X. Which expression is correct?
A. A AND B = X AND
B. X = A AND B ✓
Write X = first, then the input letters with the gate name between them: X = A AND B.
2. A NOT gate has one input A and output X. Which expression is correct?
A. X = NOT A ✓
B. X = A NOT B
NOT has only one input, so there is no B. The expression is X = NOT A.
3. An OR gate has inputs A and B. Which expression describes it?
A. X = A OR B ✓
B. X = A AND B
The gate name in the expression must match the gate in the circuit. An OR gate gives X = A OR B.
4. A circuit has one gate with the symbol of a NOR gate, inputs A and B, output X. Which expression is correct?
A. X = A NAND B
B. X = A NOR B ✓
First recognise the symbol. NOR is an OR shape with a small circle on the output, so write X = A NOR B.
5. Which statement about writing an expression for a single gate is true?
A. Name the gate, then write X = with the input letters and the gate name ✓
B. Write only the input letters and leave out the gate name
The gate name is what shows how the inputs are combined, so it must appear in the expression.

Match the Pairs

X = A AND B → The expression for a circuit with one AND gate whose inputs are A and B and whose output is X
X = NOT A → The expression for a circuit with one NOT gate that has a single input A and output X
A circuit has one OR gate with inputs A and B and output X. Write its expression. → X = A OR B
A circuit has one NOR gate with inputs A and B and output X. Write its expression. → X = A NOR B
X = A NOT → NOT has one input and the gate name goes before the letter, so this is written the wrong way round.
A AND B → The output is missing: the expression must start with X = to show what the gate outputs.

Key Term

X = A AND B
Name the gate, then write X = with the input letters and the gate name, e.g. an AND gate with inputs A and B is X = A AND B. NOT has one input: X = NOT A.

Fill in the Blanks

1. Circuit: OR gate, inputs A and B X = A OR B
Hint: Type the gate name that the circuit description gives, placed between the two input letters.
2. Circuit: NOT gate, input A X = NOT A
Hint: Type the gate name that goes before the single input letter.
3. Circuit: NOR gate, inputs A and B X = A NOR B
Hint: Type the name of the two-input gate described, written between the inputs.
4. Circuit: XOR gate, inputs A and B X = A XOR B
Hint: Type the letter that labels the output of the circuit.
5. Circuit: NAND gate, inputs B and C X = B NAND C
Hint: Type the letter of the second input to the gate.

Spot the Error

Question 1
A Circuit: one AND gate
B Inputs: A only
C Output: X
D X = A AND B
Line B — An AND gate has two inputs, so the line should read 'Inputs: A and B'. The expression X = A AND B uses both letters.
Question 2
A Symbol: flat back, no bubble
B Gate: OR
C Inputs: A and B
D X = A AND B
Line B — A flat-backed, D-shaped symbol with no bubble is an AND gate, not an OR gate. The line should be 'Gate: AND'.
Question 3
A Circuit: one NOT gate
B Input: A
C Output: X
D X = A NOT
Line D — The gate name goes before the input letter. NOT has one input, so the expression is X = NOT A.
Question 4
A Circuit: one NOT gate
B Inputs: A and B
C Output: X
D X = A OR B
Line A — The circuit has two inputs, A and B, and the expression uses OR, so it is an OR gate. A NOT gate has only one input. The line should be 'Circuit: one OR gate'.
Question 5
A Symbol: triangle and bubble
B Gate: NOT
C Inputs: A and B
D X = NOT A
Line C — A NOT gate has only one input. The line should be 'Input: A', matching X = NOT A.

Student with a class code? Join your class →