GCSE · Computer Science · AQA · Spec 8525

AND logic gate

No trip unless you've handed in the slip AND paid. Slip in, money at home? You're not going. An AND gate is exactly that fussy.

Computer Science · Logic gates

Build the AND truth table, one row at a time

Two inputs, A and B, each 0 or 1. One output, Q. In a circuit diagram the AND gate is a D shape: A and B go into the flat side and Q comes out of the curved side. Not a box with AND written in it, the D.

Cover the Q column with your hand. Before you step to each row, say out loud whether Q will be 0 or 1. Then step and see if you were right.

ANDQ = A . Bgate
ABQ
000
010
100
111
A=0, B=0 → Q = 0

Output

 

Step 1: A = 0 and B = 0. Neither input is 1, so Q = 0. The easy one.

1 / 4

Every row is a different combination of inputs. The table's finished when every combination has its own row.

Step 1 of 4: A = 0 and B = 0. Neither input is 1, so Q = 0. The easy one..

Exam line: Q = A . B is read "Q equals A AND B". The dot is the symbol for AND.
Watch out: One 1 is not enough. If any input is 0, an AND gate outputs 0.

Three inputs

Where do the eight rows come from?

Walk down any path, picking a value for A, then B, then C. Each end is one row of the table, with its output. Try the A = 0 side first. Then go hunting for every end where Q = 1. (How many do you reckon there are?)

A → B → C

2 × 2 × 2 = 8 input combinations (rows of the truth table), and the tree ends 8 times.

On Start. 2 branches to choose from.

Add a third input, C, and you get Q = A . B . C. Each input can be 0 or 1, so every input splits every path in two: 2 × 2 × 2 = 8 combinations. Each end of the tree is one row of the truth table.

Exam line: List the rows in binary counting order, 000, 001, 010 and so on up to 111, and you'll never miss a row or write one twice.
Watch out: Adding an input doubled the rows, but it didn't add a single new way to make Q = 1.

What does AND really do?

Which rule is in your head?

Everyone uses the word "and" every day, and some of that everyday meaning sneaks into logic gates. Be honest: which of these is closest to how you'd have filled in the table before this lesson?

Which rule is closest to what you think an AND gate does?
How sure are you?

Exam line: Test any rule against the row A = 1, B = 0. An AND gate gives 0 there. If your rule gives anything else, it isn't AND.

Check a finished table

Spot the wrong row

Complete the truth table for Q = A . B . C.

A student's answer — which line goes wrong?

Exam line: A quick check for any AND truth table: the Q column should hold exactly one 1, on the row where every input is 1.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

One output, one strict rule: it only says 1 when every single input says 1.

What you need to know

  • A logic gate takes inputs that are each 0 or 1 and gives one output, which is also 0 or 1.
  • The AND gate outputs 1 only when every input is 1.
  • One 0 on any input is enough: the output is then 0, whatever the other inputs are.
  • Have a goYour mate insists a two-input AND gate fed A = 1 and B = 0 should output 1, "because it's halfway there". What does the gate actually give?

    0. Halfway doesn't count.

    B is 0, and one 0 on any input makes an AND gate output 0; one input being 1 is never enough on its own.

  • A truth table shows every possible combination of inputs, one per row, with the output for each row.
  • Two inputs give 4 rows. Three inputs give 8, because each extra input doubles the rows.
  • Count up in binary (00, 01, 10, 11, or 000 to 111) and you'll never miss or repeat a row.
  • Have a goYou're listing three-input rows in binary counting order and you've just written 011. Which row comes next?

    100

    Counting up, 011 is followed by 100. Jumping to 101 or 111 skips a row, which is exactly how combinations go missing.

  • However many inputs it has, an AND table has just one row where the output is 1: the all-1s row.
  • In a Boolean expression AND is a dot: Q = A . B, or Q = A . B . C for three inputs.
  • Have a goAn AND gate has inputs X and Y and output Z. Write its Boolean expression.

    Z = X . Y

    The output goes on the left and AND's operator, the dot, sits between the inputs. A plus sign, or the word AND on its own, isn't the AND operator.

  • In a circuit diagram AND is a D shape: inputs enter the flat side, the output leaves the curved side.

The big picture

A logic gate turns inputs of 0 or 1 into one output, also 0 or 1. The AND gate outputs 1 only when every input is 1, so a single 0 anywhere makes the output 0. A truth table lists every input combination with its output: 4 rows for two inputs, 8 for three, because each extra input doubles the rows. In every AND table just one row outputs 1. In Boolean expressions AND is a dot, Q = A . B. In circuit diagrams it is a D shape, with the inputs on the flat side and the output on the curved side.

Key points

1Only one row of an AND truth table outputs 1: the row where every input is 1. True for two inputs and for three.
2Hunt for a 0. If any input in a row is 0, that row's output is 0, whatever the other inputs are.
3List the rows in binary counting order (00, 01, 10, 11, or 000 up to 111) so you never miss or repeat a combination.
4Read A . B as "A AND B". The output is a single 0 or 1, so the dot never means adding.

Worked example

Problem

An outside light, Q, is controlled by an AND gate. Input A is 1 when it is dark and input B is 1 when a sensor detects movement. Write a Boolean expression for Q, then decide whether the light comes on when it is dark but nothing is moving.

⚠ Watch out

Treating AND like "at least one" or like adding. A = 1, B = 0 gives Q = 0, not 1. A = 1, B = 1 gives Q = 1, never 2. The output is a single 0 or 1, and it's 1 only when every input is 1.

🧠

Memory hook

AND is the fussy gate: every input has to say yes. One 0 and the answer is 0, so even eight rows hold just one 1.

✓

Check yourself

Quick check: for Q = A . B . C, what is Q when A = 1, B = 0 and C = 1? (Q = 0. B is 0, and one 0 is enough.)

Flashcards

(9)
When does an AND gate output 1?
Only when every input is 1. If any input is 0, the output is 0.
Which operator represents AND in a Boolean expression?
A dot. A . B is read "A AND B".
How many rows does a truth table need for two inputs?
4 rows: 00, 01, 10 and 11.
How many rows does a truth table need for three inputs, and why?
8 rows. Each input can be 0 or 1, so each extra input doubles the rows: 2 × 2 × 2 = 8.
In a three-input AND truth table, how many rows output 1?
Just one: the row where A = 1, B = 1 and C = 1.
One input of an AND gate is 0. What do you know about the output?
It's 0, whatever the other inputs are. One 0 is enough.
What does the AND gate look like in a circuit diagram?
A D shape. The inputs go into the flat side and the output comes out of the curved side.
What's a safe way to list every row of a truth table?
Count up in binary: 000, 001, 010, 011, 100, 101, 110, 111 for three inputs. No row gets missed or repeated.
Why can't 1 AND 1 give 2?
A gate's output is a single 0 or 1. 1 AND 1 gives 1, because every input is 1.

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 AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

How this lesson was checked. This AQA GCSE Computer Science (specification 8525)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 25 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.