GCSE · Computer Science · Edexcel · Spec 1CP2
AND in truth tables
Two inputs. Four possible situations. And AND switches on in just one of them. Which one? Make your guess now, then watch the table build and find out.
Computer Science · Truth tables
Build the A AND B truth table, row by row
Four rows, four outputs. Call each output before it appears.
| 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 it before you look.
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?
Tap 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.
Pick 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 to see its label. The gates are drawn as 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. A truth table checks it does what you meant.
- Two inputs give four combinations: 00, 01, 10, 11. Three inputs need eight rows.
- Want to be sure you haven't missed a row? Count up in binary: 000, 001, 010, 011 …
Have a goMo writes the rows for a three-input table: 000, 001, 010, 011, 100, 101, 110. Mo leans back, job done. Is it?
Not quite, Mo. The row 111 is missing.
Three inputs need eight rows, and Mo has seven. Carry on counting in binary and the next number, 111, is the one that got left off.
- AND is strict: both inputs must be 1 for the output to be 1. If either input is 0, the output is 0.
Have a goSam swears the A AND B column is 0, 1, 1, 1, "because one 1 is enough". Which row shows Sam is wrong first?
The 01 row: A is 0, so the output is 0, not 1.
Sam is using "either input is 1". AND needs both, and on the 01 row A is 0, so one 1 isn't enough.
- So, with rows 00, 01, 10, 11, the A AND B column reads 0, 0, 0, 1 from top to bottom.
- Building a table? Inputs first, then one column per part in precedence order: 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: 0, 0, 1, 0.
Have a goIn the A AND NOT B table, what are A and B on the one row that outputs 1?
A is 1 and B is 0 (the 10 row).
The AND needs A and NOT B both to be 1, and NOT B is 1 only where B is 0. Picking B = 1 forgets the NOT.
- For A AND B AND C, with rows in binary order, the final column is all zeros until the final row.
- Got a circuit diagram? Label each gate's output with its expression, like A AND B. Those labels become your column headings.
The big picture
A truth table shows the output for every possible combination of inputs, so you can check the logic does what you meant. List all the input rows first (counting in binary is the easy way), then add one column per part of the expression in precedence order: brackets first, NOT before AND. An AND 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 feels natural to put a 1 whenever one input is 1, because something is switched on. But AND needs both, so a row with a single 1 still gives 0.
Memory hook
AND is the strict bouncer: everyone in the group needs a 1 to get in. One 0 at the door, and the whole row gets 0.
Check yourself
No peeking: write the four input rows for A and B in order, then put the A AND B output next to each. 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 for two inputs? For three?
What's an easy way to avoid missing an input combination?
Rows 00, 01, 10, 11: what does the A AND B column read, top to bottom?
In what order do you add columns for an expression with AND?
Table for A AND NOT B: what do you work out first, and what does each column read?
Rows 000 to 111 in binary order: what does the final column of A AND B AND C look like?
Starting a truth table from a circuit diagram: what do you do first with each gate?
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 28 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.