GCSE · Computer Science · Edexcel · Spec 1CP2
AND in truth tables
Two inputs, four possible situations — and only one of them switches AND on. Which one? Have a guess, then watch the table build and see if you were right.
Computer Science · Truth tables
Build the A AND B truth table, row by row
Four input rows, four outputs. Before each output appears, make your own call.
| A | B | A AND B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Output
Step 1: Row 1 of 4. Both inputs are 0. Call the output before you read on.
Press Next to bring in each row. Say the output out loud before you check it.
Computer Science · Truth tables
Where do the rows come from?
Click a branch at each stage to walk one path, then back up and try another.
Input A → Input B → Input C
2 × 2 × 2 = 8 rows of the truth table, and the tree ends 8 times.
Choose A, then B, then C. Every complete path is one row of the table.
Computer Science · Structure
A circuit, labelled gate by gate
Tap any box. The gates are plain boxes here, not the usual gate symbols.
Tap any part of the diagram to see what it does.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Every combination gets a row
What you need to know
- A truth table shows the output for every possible combination of inputs into a gate, circuit or Boolean expression.
- A Boolean expression comes out as either true or false, and a truth table checks it means what you intended.
- Two inputs give four combinations: 00, 01, 10, 11. Three inputs need eight rows.
- Counting up in binary (000, 001, 010, 011 …) is an easy way to be sure you miss no row.
Have a goMo lists the rows for a three-input table as 000, 001, 010, 011, 100, 101, 110. Mo says that's all of them. Is it?
No. The eighth row, 111, is missing.
Three inputs need eight rows, and counting in binary to the end shows straight away that 111 hasn't been written.
- For AND, both inputs must be 1 for the output to be 1. If either input is 0, the output is 0.
Have a goPredict before you read on: in the four-row table for A AND B, how many rows will have an output of 1?
Just one: the row where A and B are both 1.
A 0 on either input makes the output 0, and only one of the four combinations has no 0 in it.
- So the A AND B column reads 0, 0, 0, 1 from top to bottom.
- Build any AND table in order: input combinations first, then a column per part, brackets first and NOT before AND.
- For A AND NOT B, work out NOT B first (1, 0, 1, 0), then AND it with A to get 0, 0, 1, 0.
Have a goIn the A AND NOT B table, what are A and B on the one row where the output is 1?
A is 1 and B is 0 (the 10 row).
The AND needs A and NOT B both 1, and NOT B is 1 only where B is 0. Reading the outputs 0, 0, 1, 0 against the row order 00, 01, 10, 11 puts that 1 on the 10 row.
- For A AND B AND C, the final column is all zeros until the final row.
- From a circuit diagram, label each gate's output with its expression (like A AND B). The labels become column headings.
The big picture
A truth table lists the output for every possible combination of inputs. You build it by writing out all the input rows first, then adding one column per part of the expression in the right order. For AND, a column is 1 only on rows where every input to it is 1.
Key points
Worked example
Problem
Build the truth table for NOT A AND B, with the inputs A and B listed in binary order.
⚠ Watch out
Treating AND as "either". It is easy to put a 1 in the output whenever one input is 1. AND needs both, so a row with a single 1 still gives 0.
Memory hook
AND is the strict one: it wants ALL its inputs to be 1, so one 0 anywhere and the row is 0.
Check yourself
Without looking back: list all four input rows for A and B in order, then write the A AND B outputs next to them. Can you say why only the last row gets a 1?
Flashcards
(11)What does a truth table show?
What is a Boolean expression?
Why build a truth table for a Boolean expression?
When is the output of AND equal to 1?
How many rows do two inputs need? Three inputs?
What is an easy way to avoid missing an input combination?
Top to bottom, what does the A AND B column read for the rows 00, 01, 10, 11?
In what order do you add columns to the truth table for an expression with AND?
In the table for A AND NOT B, what do you work out first, and what does each column read?
What does the final column of A AND B AND C look like?
How do you start a truth table from a circuit diagram?
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 9 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.