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.

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 the output before you read on.

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 the output before you read on..

Exam line: A AND B is 1 only when A and B are both 1, so its column reads 0, 0, 0, 1 from top to bottom.
Watch out: "Either input is 1" is the tempting wrong rule. The 01 and 10 rows are exactly where it falls over.

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.

On Start. 2 branches to choose from.

Choose 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 top to bottom and you are counting in binary (000, 001, 010, 011 …), so no row gets missed.
Watch out: The tree is a checklist, not a bet. Every path gets a row, whether the output on that row 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. The gates are 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. Pick the line where the working goes wrong.

A student's working — which line goes wrong?

Computer Science · Truth tables

What do you really think AND does?

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

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

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 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?
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 the expression represents the logic 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 do two inputs need? Three inputs?
Two inputs give four combinations (00, 01, 10, 11). Three inputs need eight rows.
What is an easy way to avoid missing an input combination?
Write the binary numbers in order: 000, 001, 010, 011 …
Top to bottom, what does the A AND B column read for the rows 00, 01, 10, 11?
0, 0, 0, 1.
In what order do you add columns to the truth table for an expression with AND?
Input combinations first, then one column per part in order of precedence: brackets first, and NOT before AND.
In the table for A AND NOT B, what do you work out first, and what does each column read?
NOT B first, reading 1, 0, 1, 0. Then A AND NOT B reads 0, 0, 1, 0.
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.
How do you start a truth table from a circuit diagram?
Label the output of each gate 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 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.