GCSE · Computer Science · Edexcel · Spec 1CP2
OR in truth tables
Three inputs, eight rows of 1s and 0s. How many rows will A OR B OR C output as 0? Guess now, then step through and find out.
Computer Science · Logic
Build A OR B OR C, one row at a time
The rows go in binary order, 000 to 111, so not one combination gets missed. Two working columns, then the output.
Before you press Next: how many of the eight rows will output 0?
1 A OR B (working column)2 B OR C (working column)3 A OR B OR C (output)
| A | B | C | A OR B | B OR C | A OR B OR C |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 |
Output
Step 1: 000: no input is 1, so every column is 0. Output 0.
Press Next to reveal each row. Say the output out loud before it appears.
Predict, then check
Commit before you build anything. Brackets get evaluated first.
Here's A OR (A AND B). For AB = 00, 01, 10, 11, what will its output column be?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
What you need to know
- OR gives 1 if either input is 1, or both. So A OR B reads 0, 1, 1, 1 for AB = 00, 01, 10, 11.
Have a goLily's lamp comes on when switch A OR switch B is on. She flips both on and confidently waits for the lamp to go off. Will it?
No. With A = 1 and B = 1, OR gives 1, so the lamp stays on.
Two 1s don't cancel out. OR is 1 when either input is 1, or both; the only 0 comes when both are 0.
- A truth table shows the output for every possible combination of inputs to a logic gate or logic circuit.
- In a truth table, 1 means true and 0 means false. A Boolean expression always evaluates to one or the other.
- Two inputs give four combinations; three give eight. Writing them as binary numbers in order means none go missing.
Have a goYou've written the first row of a three-input table as 000. Counting up in binary, what are the next three rows?
001, 010, 011.
Each row is one more than the last in binary, so you can't skip a combination or write one twice.
- Give each part of the expression its own column, worked out in order: brackets first, and NOT before AND or OR.
- NOT A OR B means (NOT A) OR B. NOT (A OR B) is different: there, the brackets make the OR happen first.
Have a goA = 0 and B = 1. Work out NOT A OR B.
1.
NOT goes first, so NOT A = 1, and 1 OR anything is 1. Doing the OR first and then inverting gives 0, but that's NOT (A OR B).
- With only ORs, as in A OR B OR C, the order of combining doesn't matter. Output 0 needs every input at 0.
- Brackets can make an input irrelevant: A OR (A AND B) is true whenever A is true, whatever B is.
- For a circuit, label each gate's output with its expression. Those labels become the column headings; each output feeds the next gate.
- Testing a circuit? Compare its output column with the column you intended. One row that disagrees exposes the error.
The big picture
OR outputs 1 when either input is 1, or both, and 0 only when every input is 0. A truth table lists every possible combination of inputs (binary order stops you missing one), gives each part of the expression its own column, and works brackets first and NOT before OR. Once you can build one, you can use it to check whether a circuit really does what it was meant to.
Key points
Worked example
Problem
Build the truth table for (A OR B) AND C.
⚠ Watch out
Reading OR as 'one or the other, but not both' and writing 0 in the 11 row. OR gives 1 there too. The other classic trap: treating NOT A OR B as NOT (A OR B). NOT goes first, so without brackets it only flips A.
Memory hook
OR is easy to please: one 1 and it says yes. The only way to get a 0 out of it is all zeros in. Brackets first, NOT next.
Check yourself
Without looking back, build the truth table for B OR NOT C with columns B, C, NOT C and output. Then circle the one row that outputs 0 and say why it's that row.
Flashcards
(13)What does OR output?
What is a truth table?
What is a Boolean expression?
In a truth table, what do 1 and 0 stand for?
How many rows does a truth table need for two inputs? For three?
What's an easy way to make sure you don't miss an input combination?
In a Boolean expression, what gets evaluated first?
What does NOT A OR B mean?
How do you work out NOT (A OR B)?
In A OR B OR C, does it matter which OR you work out first?
A OR (A AND B) behaves exactly like which single input?
Building a truth table from a circuit: where do the column headings come from?
How does a truth table show that a circuit is wrong?
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 Edexcel GCSE Computer Science topics
How this lesson was checked. This Edexcel GCSE Computer Science (specification 1CP2)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 27 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.