GCSE · Computer Science · Edexcel · Spec 1CP2

Three-input truth tables

Three inputs. Eight rows. One simple counting trick means you can never miss a combination — and the answer is never a guess.

Computer Science · Logic

Build A OR (B AND C) one column at a time

Look at the whole table first. Then step through the eight rows and watch how the last column is made from the one before it.

The brackets say B AND C comes first. What does that column do to the last one?

ORQ = A OR (B AND C)gate
ABCB AND CA OR (B AND C)
00000
00100
01000
01111
10001
10101
11001
11111
A=0, B=0, C=0, B AND C=0 → A OR (B AND C) = 0

Output

 

Step 1: Start at the top. First build the B AND C column, then use it to build the last column.

1 / 8

Press Next to move down the rows. The B AND C column is always worked out before the last column.

Step 1 of 8: Start at the top. First build the B AND C column, then use it to build the last column..

Exam line: List every input row, then add one column for each part of the expression — brackets first — using the columns you already have.
Watch out: Row 111 has A = 1 and B AND C = 1. Both inputs to the OR are 1, and OR still gives 1.

Computer Science · Counting the rows

Why three inputs need eight rows

Pick a value for A, then B, then C. Every path you can walk ends at one row of the table.

A → B → C

2 × 2 × 2 = 8 rows in the truth table, and the tree ends 8 times.

On Start. 2 branches to choose from.

Each input is either 0 or 1. Walk the tree: choose A, then B, then C, and see where you end up.

Computer Science · The OR rule

When does an OR gate give 1?

A and B go into an OR gate. Think about the row where A = 1 and B = 1.

Which of these is closest to what you think right now?
How sure are you?

Computer Science · Your turn

Build A OR B OR C yourself

Build the truth table for A OR B OR C. The eight rows run 000, 001, 010, 011, 100, 101, 110, 111 and the columns are A, B and C.

  1. Three inputs give eight rows. Write the binary count 000 to 111 down the side so no combination is missed.
  2. missing step
Which line is step 2?

Computer Science · Check the working

Where did the brackets go?

A student builds the truth table for A OR (B AND C). Read their working and pick the line where it first goes wrong.

A student's working — which line goes wrong?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

What you need to know

  • A truth table lists the output for every possible combination of inputs to a logic gate, logic circuit or Boolean expression.
  • Three inputs, A, B and C, give eight combinations, so the table needs eight rows.
  • Write the rows as binary numbers in order, 000 to 111, and you cannot miss one.
  • Have a goA classmate confidently writes the rows as 000, 001, 010, 100, 101, 110, 111 and says 'that's all eight'. Which row did they miss?

    011

    Counting up in binary goes 010 then 011 then 100, so 011 is the gap. That is why the binary order is the safe way to list the rows.

  • AND gives 1 only if both inputs are 1. NOT turns 0 into 1 and 1 into 0.
  • Have a goA = 1 and B = 0. What does A AND B give, and then what does NOT of that give?

    A AND B gives 0, and NOT of 0 gives 1.

    AND needs both inputs to be 1, and only A is. NOT then flips the 0 it receives.

  • OR gives 1 if either input is 1, or both.
  • Add one column for each part of the expression, in order: brackets first, and NOT before AND.
  • Have a goThere are no brackets in 'NOT A AND B'. Which part do you work out first?

    NOT A.

    NOT comes before AND in the order of working, so you invert A first and then AND the result with B.

  • Work each new column out from the columns already there.
  • A AND B AND C is 0 in every row except the last. A OR B OR C is 0 only in the first.
  • To start from a circuit, label each gate's output with its expression. Those labels become the column headings after the inputs.

The big picture

Three inputs make eight rows, listed in binary order so none are missed. Then you add one column per part of the expression, brackets first, each built from the columns already there.

Key points

1Rows: every combination of inputs. Three inputs give eight, written in binary order.
2Columns: one for each part of the expression, brackets first, each built from the ones before.
3AND needs both inputs 1; OR needs either or both; NOT flips the input.
4Quick checks: A AND B AND C has a single 1, on the last row. A OR B OR C has a single 0, on the first.

Worked example

Problem

A circuit has three inputs, A, B and C. A and B go into an AND gate. The output of that gate and C go into a second AND gate, and its output is Q. Build the truth table for Q.

⚠ Watch out

Treating OR as 'one or the other, but not both'. In a truth table OR gives 1 when either or both inputs are 1, so a row where both inputs are 1 still gives 1.

🧠

Memory hook

A AND B AND C lights up only on the very last row. A OR B OR C goes dark only on the very first.

✓

Check yourself

Cover the page. List the eight rows, build B AND C, then finish A OR (B AND C). Your final column should have five 1s.

Flashcards

(12)
What does a truth table show?
The output for every possible combination of inputs to a logic gate, logic circuit or Boolean expression. It summarises the logic and checks it is what was intended.
How many rows does a three-input truth table need?
Eight, because there are eight possible combinations of the three inputs A, B and C.
What is an easy way to make sure no input combination is missed?
Write the binary numbers in order: 000, 001, 010, 011, 100, 101, 110, 111.
What is the method for building a truth table?
Add all the input combinations, then add a column for each part of the expression in order of precedence (brackets first, NOT before AND), using the earlier columns to work out the next.
When does an AND gate give 1?
Only when both inputs are 1.
When does an OR gate give 1?
When either input is 1, or both are.
What does a NOT gate do?
It inverts its input: 0 becomes 1 and 1 becomes 0.
Where is the only 1 in the final column of A AND B AND C?
In the last row, 111. Every row above it is 0.
Where is the only 0 in the final column of A OR B OR C?
In the first row, 000. Every other row is 1.
In A OR B OR C, does the order you work out the two ORs matter?
No. Both gates are OR, so the final column comes out the same either way.
Which column do you build first for A OR (B AND C), and what does the final column read?
B AND C first (the brackets), then OR it with A. The final column reads 0, 0, 0, 1, 1, 1, 1, 1.
How do you start a truth table from a circuit diagram with three inputs?
Label the output of each gate with the Boolean expression it represents, for example A AND B, then (A AND B) AND C. The labels become the column headings after the inputs.

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 11 November 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.