← IGCSE Computer Science Paper 2

Creating a logic circuit from an expression

Draw one gate per operator: the bracket (A AND B) becomes an AND gate first, and its output feeds the final OR gate along with C to give X.

Understanding Creating a logic circuit from an expression in IGCSE Computer Science Paper 2

What it does: This expression has two operators, OR and AND, so the circuit has an OR gate feeding an AND gate. NOT only acts on A, so a NOT gate sits on input A and its output goes into the AND gate with B. Work out the bracketed part first. The AND gate comes first and its output then feeds the final OR gate. Draw one gate for each operator, not one for each input. There are two operators (AND, OR), so there are two gates. NOT C is an operator too, so it needs its own gate. The AND and NOT outputs both feed the final OR gate.

Common mistakes: The bracket (A AND B) must become an AND gate. Line 2 should read 'Gate 1: AND, inputs A and B'. The final gate (the AND gate, Gate 2) produces X. Gate 1 only feeds into Gate 2. Line 4 should read 'Gate 2 output is X'.

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
To draw a circuit for X = (A AND B) OR C, which gate do you draw first?
The OR gate, because it gives the final output XThe AND gate, because it is in the brackets
Matches
For X = (A AND B) OR C, drawing an OR gate for A and B, then an AND gate with C
↓
The gates are swapped. The bracket contains AND, so A and B go into an AND gate first, and the OR gate comes last with C.
Applying
Meanings
Term
X = (A AND B) OR C
Meaning
Draw one gate per operator: the bracket (A AND B) becomes an AND gate first, and its output feeds the final OR gate along with C to give X.
Practice
X = (A AND B) OR (NOT C)
Testing
Gaps
Gate 1 (bracket): gate, inputs A and B
Check Answer
Spots
1X = (A AND B) OR C
2Gate 1: OR, inputs A and B

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

The 'Walrus' badge — Method Master, 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. To draw a circuit for X = (A AND B) OR C, which gate do you draw first?
A. The AND gate, because it is in the brackets ✓
B. The OR gate, because it gives the final output X
Work out the bracketed part first. The AND gate comes first and its output then feeds the final OR gate.
2. How many gates are needed to draw X = (A AND B) OR C?
A. 3 gates: one for each input A, B and C
B. 2 gates: one AND and one OR ✓
Draw one gate for each operator, not one for each input. There are two operators (AND, OR), so there are two gates.
3. In X = (A AND B) OR C, where does input C connect?
A. To the AND gate along with A and B
B. Directly to the OR gate ✓
C is outside the brackets. It goes straight into the final OR gate, together with the output of the AND gate.
4. For X = (A OR B) AND C, which gate produces the final output X?
A. The AND gate ✓
B. The OR gate
The OR is in the brackets so it is drawn first. Its output feeds the AND gate, which is the last gate and gives X.
5. How do you draw X = NOT A for a circuit?
A. One NOT gate with A as its only input ✓
B. One NOT gate with A and a second input of 0
A NOT gate always has exactly one input. Connect A to it and its output is X.

Match the Pairs

X = (A AND B) OR C → Draw an AND gate for A and B first, then feed its output and C into a final OR gate that gives X
X = NOT (A OR B) → Draw an OR gate for A and B, then pass its output through a NOT gate to give X
Draw one gate for each operator, so an expression with two operators needs two gates joined by a wire → X = (A OR B) AND C
A NOT applied to a single input is drawn as a NOT gate on that input before it reaches the next gate → X = (NOT A) AND B
For X = (A AND B) OR C, drawing an OR gate for A and B, then an AND gate with C → The gates are swapped. The bracket contains AND, so A and B go into an AND gate first, and the OR gate comes last with C.
For X = (A OR B) AND C, drawing one AND gate with the inputs A, B and C and no OR gate → The OR in the bracket was left out. Every operator needs its own gate, so A and B must go into an OR gate whose output feeds the AND gate with C.

Key Term

X = (A AND B) OR C
Draw one gate per operator: the bracket (A AND B) becomes an AND gate first, and its output feeds the final OR gate along with C to give X.

Fill in the Blanks

1. X = (A AND B) OR C Gate 1 (bracket): AND gate, inputs A and B Gate 2: OR gate, inputs Gate 1 and C
Hint: Type the gate that the bracketed part becomes, which is drawn first.
2. X = (A OR B) AND C Gate 1: OR gate, inputs A and B Gate 2: AND gate, inputs Gate 1 and C
Hint: Type the final gate that joins the bracket's output with C.
3. X = (NOT A) AND B Gate 1: NOT gate, input A Gate 2: AND gate, inputs Gate 1 and B
Hint: Type the gate that works on a single input.
4. X = (A AND B) OR (B AND C) One gate per operator, so gates needed: 3
Hint: Type the number of gates, counting one for each operator.
5. X = (A OR B) AND C Gate 1 output and C feed the AND gate The AND gate output is labelled X
Hint: Type the label of the final output of the circuit.

Spot the Error

Question 1
A X = (A AND B) OR C
B Gate 1: OR, inputs A and B
C Gate 2: OR, inputs G1 and C
D Gate 2 output is X
Line B — The bracket (A AND B) must become an AND gate. Line 2 should read 'Gate 1: AND, inputs A and B'.
Question 2
A X = (A OR B) AND C
B Gate 1: OR, inputs A and B
C Gate 2: AND, inputs G1 and C
D Gate 1 output is X
Line D — The final gate (the AND gate, Gate 2) produces X. Gate 1 only feeds into Gate 2. Line 4 should read 'Gate 2 output is X'.
Question 3
A X = (A AND B) OR (NOT C)
B Gate 1: AND, inputs A and B
C Gate 2: NOT, input C
D Gate 3: OR, inputs A and G2
E Gate 3 output is X
Line D — The final OR gate must take the outputs of the two bracketed gates, G1 and G2, not the raw input A. Line 4 should read 'Gate 3: OR, inputs G1 and G2'.
Question 4
A X = NOT (A AND B)
B Gate 1: AND, inputs A and B
C Gate 2: NOT, input A
D Gate 2 output is X
Line C — NOT applies to the whole bracket, so the NOT gate takes the output of the AND gate (G1), not input A. Line 3 should read 'Gate 2: NOT, input G1'.
Question 5
A X = A OR (B AND C)
B Gate 1: AND, inputs A and B
C Gate 2: OR, inputs A and G1
D Gate 2 output is X
Line B — The bracket contains B and C, so the AND gate must take inputs B and C. Line 2 should read 'Gate 1: AND, inputs B and C'.

Student with a class code? Join your class →