← IGCSE Computer Science Paper 2

The AND gate

A logic gate with two inputs that outputs 1 only when both inputs are 1; otherwise it outputs 0. Written X = A AND B, drawn as a D shape, with truth table output 0 0 0 1.

Understanding The AND gate in IGCSE Computer Science Paper 2

What it does: AND outputs 1 only in the last row, where A and B are both 1. Every other row gives 0. The AND gate is written X = A AND B. OR is a different gate with a different expression. The AND symbol is a flat-backed D shape. A triangle with a circle is the NOT gate. Only one input is 1, so the AND condition is not met and the output is 0. An AND gate has two inputs, A and B, and one output, X. A gate with one input is the NOT gate. AND has output 0 0 0 1, so only the row A = 1, B = 1 gives 1. Three rows with output 1 describes OR.

Common mistakes: An AND gate only outputs 1 when both inputs are 1. When A is 1 and B is 0, X must be 0, so the row should be 1 0 | 0. The expression for an AND gate is X = A AND B. Using OR would give X = 1 for these inputs, which does not match the final line.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 539–551) and word search (Modules 539–580).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
An AND gate outputs 1 when...
Both inputs are 1At least one input is 1
Matches
X: 0 1 1 1
↓
This is the output of an OR gate, not an AND gate. AND should be 0 0 0 1 because it needs both inputs to be 1.
Applying
Meanings
Term
AND
Meaning
A logic gate with two inputs that outputs 1 only when both inputs are 1; otherwise it outputs 0. Written X = A AND B, drawn as a D shape, with truth table output 0 0 0 1.
Practice
X = A AND B
Testing
Gaps
X = A B
Check Answer
Spots
30 1 | 0
41 0 | 1

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Puffin' badge — Definition Diver, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. An AND gate outputs 1 when...
A. At least one input is 1
B. Both inputs are 1 ✓
AND outputs 1 only when A and B are both 1. 'At least one input is 1' describes the OR gate.
2. Which output column is correct for an AND gate (rows A,B = 00, 01, 10, 11)?
A. 0 0 0 1 ✓
B. 0 1 1 1
AND gives 1 only in the last row where A = 1 and B = 1. 0 1 1 1 is the OR gate's output.
3. Which logic expression describes an AND gate?
A. X = A AND B ✓
B. X = A OR B
The AND gate is written X = A AND B. OR is a different gate with a different expression.
4. What shape is the standard AND gate symbol?
A. A triangle with a small circle on the tip
B. A D shape ✓
The AND symbol is a flat-backed D shape. A triangle with a circle is the NOT gate.
5. A = 1 and B = 0 go into an AND gate. What is X?
A. X = 0 ✓
B. X = 1
Only one input is 1, so the AND condition is not met and the output is 0.

Match the Pairs

X = A AND B → The expression for an AND gate: X is 1 only when A and B are both 1
A=0 B=1 -> X=0 → An AND gate gives 0 when only one of its inputs is 1
The output column of an AND gate truth table for the input rows 00, 01, 10, 11 → X: 0 0 0 1
An AND gate has two inputs and outputs 1 only when both inputs are 1 → A=1 B=1 -> X=1
X: 0 1 1 1 → This is the output of an OR gate, not an AND gate. AND should be 0 0 0 1 because it needs both inputs to be 1.
X = A AND → The expression is incomplete. An AND gate has two inputs, so it needs a second input after AND.

Key Term

AND
A logic gate with two inputs that outputs 1 only when both inputs are 1; otherwise it outputs 0. Written X = A AND B, drawn as a D shape, with truth table output 0 0 0 1.

Fill in the Blanks

1. X = A AND B
Hint: Type the gate name that joins A and B in the expression
2. X = A AND B
Hint: Type the second input letter in this two-input expression
3. A=1, B=1 -> X = A AND B = 1
Hint: Type the output value when both inputs are on
4. A=1, B=0 -> X = A AND B = 0
Hint: Type the output value when only one input is on
5. Output column for AND: 0 0 0 1
Hint: Type the final output value in the truth table column

Spot the Error

Question 1
A A B | X
B 0 0 | 0
C 0 1 | 0
D 1 0 | 1
E 1 1 | 1
Line D — An AND gate only outputs 1 when both inputs are 1. When A is 1 and B is 0, X must be 0, so the row should be 1 0 | 0.
Question 2
A X = A OR B
B A = 1
C B = 0
D X = 0
Line A — The expression for an AND gate is X = A AND B. Using OR would give X = 1 for these inputs, which does not match the final line.
Question 3
A INPUT A
B INPUT B
C X ← A NAND B
D OUTPUT X
Line C — NAND is a different gate whose output is the opposite of AND. The AND gate expression should be X ← A AND B.
Question 4
A AND gate symbol
B Shape: triangle and circle
C Inputs: 2
D Output: 1
Line B — The AND gate is drawn as a D shape. A triangle with a small circle is the symbol for a NOT gate.
Question 5
A Row 0 0 gives X = 0
B Row 0 1 gives X = 0
C Row 1 0 gives X = 0
D Row 1 1 gives X = 0
Line D — Both inputs are 1 in the last row, so an AND gate outputs 1. The line should be Row 1 1 gives X = 1.

Student with a class code? Join your class →