Brackets in logic expressions
Brackets show which gate is worked out first. Here A AND B is done first, then its result goes into OR with C. A AND (B OR C) uses the same letters but gives a different output.
Understanding Brackets in logic expressions in IGCSE Computer Science Paper 2
What it does: The innermost bracket (A AND B) is done first, then the OR bracket, and the NOT is applied last to that result. B OR C gives 1, but then 0 AND 1 gives 0. With (A AND B) OR C the same inputs would give 1. There is one gate for each operator. The letters are inputs, not gates. AND and OR are the two operators, so there are 2 gates. Brackets first: 0 AND 0 = 0. Then 0 OR 1 = 1. The brackets go around the gate that must be worked out first. Here that is A OR B, so (A OR B) AND C is correct.
Common mistakes: The inner bracket is worked out first. With A = 1 and B = 0, A AND B = 0, not 1, because AND needs both inputs to be 1. The bracket B OR C is worked out first. With B = 1 and C = 1, OR gives 1, not 0, because OR outputs 1 when at least one input is 1.
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 552–561) 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
(A AND B) OR CFill in the Blanks
Spot the Error
Student with a class code? Join your class →