Logic gates
AQA GCSE Computer Science (8525), specification 3.4.2 Boolean logic
Digital computers process data using binary signals represented as high (1, True) or low (0, False) voltages. Logic gates are the physical building blocks that carry out Boolean operations on these signals. For AQA GCSE Computer Science, you must know NOT, AND, OR, and XOR gates, construct truth tables for up to three inputs, and trace logic circuits.
What you need to know
- NOT gate (inverter): Has 1 input and 1 output. Inverts the input: an input of 0 gives 1; an input of 1 gives 0.
- AND gate: Has 2 inputs. The output is 1 only if BOTH input A AND input B are 1.
- OR gate: Has 2 inputs. The output is 1 if AT LEAST ONE input (A OR B or both) is 1.
- XOR (exclusive OR) gate: Has 2 inputs. The output is 1 if EXACTLY ONE input is 1, but 0 if both inputs are 1 or both are 0.
- Truth tables list every possible combination of inputs and the resulting output for a logic gate or circuit.
- A circuit with n inputs has 2ⁿ possible input combinations (2 inputs = 4 rows, 3 inputs = 8 rows).
What you don’t need
- NAND and NOR gates — the AQA specification explicitly states students do not need to know or use NAND and NOR gates.
- Karnaugh maps and De Morgan's Laws — these are A-Level Computer Science topics.
- Circuits with more than 3 inputs.
Worked examples
Draw the truth table for an XOR gate with inputs A and B and output Q.
- Row 1: A = 0, B = 0 -> Q = 0 (neither is 1).
- Row 2: A = 0, B = 1 -> Q = 1 (exactly one is 1).
- Row 3: A = 1, B = 0 -> Q = 1 (exactly one is 1).
- Row 4: A = 1, B = 1 -> Q = 0 (both are 1, so XOR outputs 0).
Answer: A=0, B=0 -> 0; A=0, B=1 -> 1; A=1, B=0 -> 1; A=1, B=1 -> 0.
A security alarm circuit has two sensors: Motion (M) and Window (W), plus an Arm switch (A). The alarm sounds (Q=1) if the system is Armed AND (either Motion is detected OR the Window is opened). Write the output when A=1, M=0, and W=1.
- Evaluate the OR branch: M OR W = 0 OR 1 = 1.
- Evaluate the AND gate: A AND (result of OR) = 1 AND 1 = 1.
Answer: Q = 1 (The alarm sounds).
Common mistakes
- Confusing OR and XOR: In everyday English 'or' often means one or the other, but in computing standard OR includes both inputs being 1. XOR requires strictly one input to be 1.
- Drawing an AND gate symbol instead of an OR gate symbol: AND has a flat back and rounded front; OR has a curved back and pointed front.
- Forgetting the inversion circle (bubble) on the tip of the NOT gate symbol.
- Missing combinations in a 3-input truth table: Always count in binary sequence from 000 to 111 (000, 001, 010, 011, 100, 101, 110, 111) to avoid missing rows.
Practise it
Learn it
A video lesson on this topic is on the way.
Not a subscriber? Watch a sample lesson or see pricing.
Revise next
Written to the published AQA specification. UpperGrades isn’t affiliated with or endorsed by AQA.
