Writing a logic expression from a logic circuit: several gates
Write each gate's expression from left to right, putting each earlier gate in brackets as an input to the next gate. The final gate is the outermost operator.
Understanding Writing a logic expression from a logic circuit: several gates in IGCSE Computer Science Paper 2
What it does: The OR gate comes first, so (A OR B) goes in brackets and acts as one input to the final AND gate. placeholder. Labelling each gate output lets you write one gate at a time, such as D = A AND B. Then you substitute (A AND B) into the next gate as an input, for example X = D OR C. The bracket holds the earlier AND gate, which feeds the final OR gate as one of its inputs. The final gate is the outermost operator. Without brackets the order of the gates is not shown, so the expression does not match the circuit.
Common mistakes: The first gate is an AND gate, so P = A AND B. Writing OR here makes the final expression (A AND B) OR C impossible. The final expression uses (A OR B), so the first gate must be P = A OR B, not AND.
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.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
X = (A AND B) OR CFill in the Blanks
Spot the Error
Student with a class code? Join your class →