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.

ANDA AND Bgate
ABA AND B
000
010
100
111
A=0, B=0 → A AND B = 0

Output

 

Step 1: Row 1 of 4. Both inputs are 0. Call it before you look.

1 / 4

Press Next to bring in each row. Say the output out loud before you check it.

Step 1 of 4: Row 1 of 4. Both inputs are 0. Call it before you look..

Exam line: A AND B is 1 only when A and B are both 1, so with the rows in the order 00, 01, 10, 11 its column reads 0, 0, 0, 1.
Watch out: "One 1 is enough" sounds reasonable. The 01 and 10 rows are exactly where it falls apart.

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.

On Start. 2 branches to choose from.

Pick A, then B, then C. Every complete path is one row of the table.

Exam line: Two inputs give four rows. Three inputs give eight. Read the ends from top to bottom and you're counting in binary (000, 001, 010, 011 …), which is the easy way to make sure no row goes missing.
Watch out: This tree is a checklist, not a bet. Every path gets a row, whether its output turns out to be 0 or 1.

Computer Science · Truth tables

Your turn: build A AND NOT B

Build the truth table for A AND NOT B, one column at a time. At each gap, pick the next step.

  1. Start with all four input combinations for A and B, in order: 00, 01, 10, 11.The same four rows as the A AND B table.
  2. missing step
Which line is step 2?

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.

Computer Science · Truth tables

Check this three-input table

A student builds the truth table for A AND B AND C, with the rows in binary order. Which line goes wrong?

A student's working — which line goes wrong?

Computer Science · Truth tables

What do you really think AND does?

You're about to fill in the output column for A AND B.

Be honest: which of these is closest to what you think right now?
How sure are you?

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

1A truth table lists the output for all possible combinations of inputs. Every combination gets a row.
2AND is 1 only when every input to it is 1. One 0 and the output is 0.
3List the input rows first (binary counting helps), then add a column for each part in precedence order.
4Brackets come first, then NOT, then AND.
5In a circuit, each gate's output label becomes a column heading.

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?
The output for all possible combinations of inputs into a logic gate, logic circuit or Boolean expression.
What is a Boolean expression?
An expression that evaluates to either true or false.
Why build a truth table for a Boolean expression?
To summarise the logic and check that the expression does what you intended.
When is the output of AND equal to 1?
Only when both inputs are 1. If either input is 0, the output is 0.
How many rows for two inputs? For three?
Two inputs: four combinations (00, 01, 10, 11). Three inputs: eight rows.
What's an easy way to avoid missing an input combination?
Write the binary numbers in order: 000, 001, 010, 011 …
Rows 00, 01, 10, 11: what does the A AND B column read, top to bottom?
0, 0, 0, 1.
In what order do you add columns for an expression with AND?
Input combinations first, then one column per part in order of precedence: brackets first, and NOT before AND.
Table for A AND NOT B: what do you work out first, and what does each column read?
NOT B first: 1, 0, 1, 0. Then A AND NOT B: 0, 0, 1, 0.
Rows 000 to 111 in binary order: what does the final column of A AND B AND C look like?
All zeros until the final row. It needs a 1 in column C and a 1 in column A AND B.
Starting a truth table from a circuit diagram: what do you do first with each gate?
Label its output with the Boolean expression it represents (for example A AND B). The labels become the column headings.

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