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.
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Output
Step 1: A = 0 and B = 0. Neither input is 1, so Q = 0. The easy one.
Every row is a different combination of inputs. The table's finished when every combination has its own row.
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.
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.
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
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?
Which operator represents AND in a Boolean expression?
How many rows does a truth table need for two inputs?
How many rows does a truth table need for three inputs, and why?
In a three-input AND truth table, how many rows output 1?
One input of an AND gate is 0. What do you know about the output?
What does the AND gate look like in a circuit diagram?
What's a safe way to list every row of a truth table?
Why can't 1 AND 1 give 2?
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 AQA GCSE Computer Science topics
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.