Logic expression for a single gate
A logic expression for one gate: write the output X, an equals sign, then the input letters joined by the gate name in capitals, such as X = NOT A or X = A XOR B.
Understanding Logic expression for a single gate in IGCSE Computer Science Paper 2
What it does: The expression follows the pattern X = input gate-name input, with NAND in capitals between A and B. Gate names are written in capitals in Cambridge logic expressions, so AND not and. NOT goes before the input letter. It only has one input, so there is nothing to join. XOR is its own gate name. Writing OR describes a different gate. The output X is written first, then an equals sign, then the inputs and the gate name. NOT has one input and is written before it, as in X = NOT A, not after it.
Common mistakes: Gate names must be written in capitals. The line should be X = A AND B. A logic expression starts with the output, X, then an equals sign, then the inputs and gate. It should be X = A XOR B.
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
X = A AND BFill in the Blanks
Spot the Error
Student with a class code? Join your class →