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)
ABCA OR BB OR CA OR B OR C
000000

Output

 

Step 1: 000: no input is 1, so every column is 0. Output 0.

1 / 8

Press Next to reveal each row. Say the output out loud before it appears.

Step 1 of 8: 000: no input is 1, so every column is 0. Output 0..

Either one, or both

Where does each row land?

Place each two-input row. Is A 1 in that row? Is B 1? Both? Neither? Then look at which rows A OR B makes 1.

  • A A is 1
  • B B is 1
  1. Row AB = 00
  2. Row AB = 01
  3. Row AB = 10
  4. Row AB = 11

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?

Your turn to fill the gaps

Build A OR (B AND C)

Complete the truth table for A OR (B AND C).

  1. Three inputs, so the table needs eight rows.
  2. missing step
Which line is step 2?

Find the faulty line

Where does this NOT go wrong?

Complete the output column of NOT A OR B for AB = 00, 01, 10, 11.

Sam's answer — which line goes wrong?

Test a circuit

Does the circuit do what was intended?

A circuit sends inputs C and I into an OR gate, and the OR gate's output into a NOT gate, giving output Y. It was meant to output 1 only when C is 1 and I is 0. Use a truth table to decide whether the circuit does what was intended, and identify a row that shows it. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

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

1OR: 1 if any input is 1; 0 only when all inputs are 0.
2List inputs in binary order: four rows for two inputs, eight for three.
3Brackets first; NOT before AND and OR. One column per part.
4NOT A OR B = 1, 1, 0, 1; NOT (A OR B) = 1, 0, 0, 0.
5A OR (A AND B) = 0, 0, 1, 1, the same as A.
6Circuits: gate-output labels become column headings; compare the final column with the intended one.

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?
1 if either input is 1, or both. 0 only when all the inputs are 0.
What is a truth table?
A table showing the outputs for all possible combinations of inputs into a logic gate or logic circuit.
What is a Boolean expression?
An expression that evaluates to either true or false.
In a truth table, what do 1 and 0 stand for?
1 means true; 0 means false.
How many rows does a truth table need for two inputs? For three?
Four for two inputs; eight for three.
What's an easy way to make sure you don't miss an input combination?
Write the combinations as binary numbers in order: 000, 001, 010, 011 and so on.
In a Boolean expression, what gets evaluated first?
Brackets. Then NOT, which comes before AND and OR.
What does NOT A OR B mean?
(NOT A) OR B. The NOT applies to A only, because NOT is evaluated before OR.
How do you work out NOT (A OR B)?
Brackets first: build the A OR B column, then invert every value in it.
In A OR B OR C, does it matter which OR you work out first?
No. With only ORs, any order of combining gives the same output column.
A OR (A AND B) behaves exactly like which single input?
A. It's true when A is true, whether B is true or false.
Building a truth table from a circuit: where do the column headings come from?
Label each gate's output with the Boolean expression it represents. Those labels are the headings, and one gate's output becomes an input to the next.
How does a truth table show that a circuit is wrong?
The circuit's output column differs from the intended column in at least one row.

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 posted

More Edexcel GCSE Computer Science topics

See the full Edexcel Computer Science curriculum →

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.