GCSE · Computer Science · AQA · Spec 8525
Boolean expressions
A café sign says: 'Free biscuit with a coffee OR a cake.' You buy both. Biscuit or no biscuit? Logic gives a definite answer.
Computer Science · Boolean logic
Q = (A OR B) AND NOT C — one row at a time
Three inputs, each true (T) or false (F). Plain-English reminder: NOT flips a value, AND needs both sides true, OR needs at least one side true. (Many books write 1 and 0 instead of T and F — it means the same.)
Try it yourself: for each highlighted row, work out the bracket first, then NOT C, then Q — and only then read the note.
| A | B | C | A OR B | NOT C | Q |
|---|---|---|---|---|---|
| F | F | F | F | T | F |
| F | F | T | F | F | F |
| F | T | F | T | T | T |
| F | T | T | T | F | F |
| T | F | F | T | T | T |
| T | F | T | T | F | F |
| T | T | F | T | T | T |
| T | T | T | T | F | F |
Output
Step 1: A, B and C are all F. Bracket first: A OR B is F, because OR needs at least one T and there isn't one. Next, NOT C flips F to T. Last step: F AND T. AND needs both sides true, so Q = F.
The first three columns are the inputs. The next two are the working: the bracket gets its own column, then NOT C. Q is the answer for that row.
How many rows?
Every extra input doubles the rows
Pick a branch at each level to walk one path, then compare it with the other paths.
Input A → Input B → Input C
2 × 2 × 2 = 8 rows of the truth table, and the tree ends 8 times.
Walk any path from the start. Each complete path is one row of a three-input truth table. Read down the ends: C alternates every row, B every two rows, A every four — that's how to list rows without missing one.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a long logic statement boils down to one true-or-false answer — row by row.
What you need to know
- A Boolean expression, however long, works out to a single value: true or false.
- NOT, AND, OR and XOR are the building blocks, and each one has a fixed pattern of true and false.
- Brackets mean 'work this out first' — give the bracketed part its own column in the truth table.
- n inputs need 2^n rows, so 2 inputs give 4 rows and 3 inputs give 8.
- To write an expression from words or a circuit, name the inputs, spot the operators, and bracket what belongs together.
The big picture
A Boolean expression, however long, can only ever be true or false. A truth table checks it for every possible combination of inputs, working inside the brackets first, so nothing is left to guesswork.
Key points
Worked example
Problem
Complete the truth table for Q = NOT (A AND B).
⚠ Watch out
Trying to do a whole bracketed expression in your head in one go. Skip the bracket column and it is easy to apply the outer operator to the wrong thing. Give the bracket its own column, fill it for every row, then do the outer step.
Memory hook
OR is generous: at least one will do. XOR is picky: exactly one, never both.
Check yourself
A = T, B = T, C = F. What is A XOR (B AND C)? Bracket first. Answer: the bracket is F, then T XOR F is T.
Flashcards
(12)What values can a Boolean expression ever have?
What does NOT do?
When is A AND B true?
When is A OR B true?
When is A XOR B true?
Why is everyday 'or' not the same as logic OR?
What do brackets tell you in a Boolean expression?
How many rows does a truth table with n inputs have?
Why does each extra input double the rows?
How do you list the rows of a 3-input table without missing one?
How do you turn a sentence into an expression?
How do you write an expression for a logic circuit?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 2 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.