GCSE Computer Science revision
Boolean Logic & Logic Gates
AND, OR and NOT gates, truth tables and circuits.
What you will learn
- Boolean logic
- Logic gates
- Truth tables
- Combining gates
- Uses of logic
Boolean logic
Boolean logic uses True (1) and False (0). Three basic operations combine them: AND, OR and NOT.
- Values are 1 (true) or 0 (false)
- AND: true only if both inputs are true
- OR: true if at least one input is true
- NOT: reverses a single input
Logic gates
A logic gate is a circuit that does a Boolean operation. Gates are the building blocks of computer processors.
- AND gate: output 1 only if both inputs 1
- OR gate: output 1 if either input 1
- NOT gate: output is the opposite of the input
- Gates are made of transistors
Truth tables
A truth table shows every possible input and the output for a gate or circuit. List all input combinations, then work out the output.
- Two inputs give 4 rows (00, 01, 10, 11)
- Three inputs give 8 rows
- Work out the output for each row
- Truth tables fully describe a circuit
Combining gates
Gates can be combined to make more complex circuits, such as a half adder that adds two binary digits.
- AND + OR + NOT can make any circuit
- XOR: true if inputs differ
- A half adder uses XOR for the sum and AND for the carry
- Computers build arithmetic from gates
Uses of logic
Logic gates process binary data in every computer — from simple decisions to full processors.
- Gates make up the ALU in a CPU
- They control data flow in circuits
- Boolean logic underpins search filters
- Every computation is built from gates
Worked answers
1. An AND gate outputs 1 when…
Answer: Both inputs are 1
Why: AND needs both inputs true to give a true output.
Wrong options to rule out: Either input is 1; Both inputs are 0; One input is 0
2. An OR gate outputs 1 when…
Answer: At least one input is 1
Why: OR is true if either or both inputs are true.
Wrong options to rule out: Both inputs are 1 only; Both inputs are 0; No inputs are 1
3. A NOT gate…
Answer: Reverses its single input
Why: NOT inverts: 1 becomes 0 and 0 becomes 1.
Wrong options to rule out: Needs two inputs; Adds two inputs; Is always 1
Practice questions
Answer from memory first. Pick an option to check it and read the explanation.
1. How many rows are in the truth table for two inputs?
2. XOR outputs 1 when…
3. A half adder's carry is produced by an… gate.
4. A half adder's sum is produced by an… gate.
5. Logic gates are built from…