← IGCSE Computer Science Paper 2

The XOR (EOR) gate

The XOR (exclusive OR, or EOR) gate has two inputs and outputs 1 only when the inputs are different. Its truth table output is 0 1 1 0. Its symbol is the OR shape with an extra curve at the input.

Understanding The XOR (EOR) gate in IGCSE Computer Science Paper 2

What it does: XOR gives 0 when the inputs are the same (00 and 11) and 1 when they are different (01 and 10), so the column reads 0 1 1 0. The expression A XOR B means one input or the other, but not both, which is why 1 and 1 gives 0. The inputs are the same, so XOR outputs 0. This is the row that differs from a normal OR gate. XOR gives 0 for 00, 1 for 01, 1 for 10 and 0 for 11. 0 1 1 1 is the OR gate. The expression for the exclusive OR gate is X = A XOR B. XNOR is not a gate in the 0478 syllabus.

Common mistakes: The inputs 0 and 1 are different, so an XOR gate outputs 1. The row should be 0 1 1. XOR outputs 1 when the inputs are different. A and B differ here, so the line should be X ← 1.

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 552–561) 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 XOR gate has inputs A = 1 and B = 0. What is the output X?
X = 1X = 0
Matches
A=1, B=1 gives X=1 for XOR
↓
The inputs are the same, so an XOR gate outputs 0, not 1. A 1 output for 1 and 1 belongs to an OR gate.
Applying
Meanings
Term
X = A XOR B
Meaning
The XOR (exclusive OR, or EOR) gate has two inputs and outputs 1 only when the inputs are different. Its truth table output is 0 1 1 0. Its symbol is the OR shape with an extra curve at the input.
Practice
X = A XOR B
Testing
Gaps
X = A B
Check Answer
Spots
20 0 0
30 1 0

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

The 'Constellation Wolf' badge — Space Legend, 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 XOR gate has inputs A = 1 and B = 0. What is the output X?
A. X = 1 ✓
B. X = 0
XOR outputs 1 when the two inputs are different. 1 and 0 are different, so X = 1.
2. An XOR gate has inputs A = 1 and B = 1. What is the output X?
A. X = 1
B. X = 0 ✓
The inputs are the same, so XOR outputs 0. This is the row that differs from a normal OR gate.
3. Which output column (rows 00, 01, 10, 11) matches an XOR gate?
A. 0 1 1 1
B. 0 1 1 0 ✓
XOR gives 0 for 00, 1 for 01, 1 for 10 and 0 for 11. 0 1 1 1 is the OR gate.
4. Which logic expression describes an XOR gate?
A. X = A XOR B ✓
B. X = A XNOR B
The expression for the exclusive OR gate is X = A XOR B. XNOR is not a gate in the 0478 syllabus.
5. How does the XOR gate symbol differ from the OR gate symbol?
A. It has an extra curved line at the input side ✓
B. It has a small circle at the output
XOR is the OR shape with an extra curve at the input. A small circle at the output would make it a NOR (or NAND) type symbol.

Match the Pairs

X = A XOR B → The output X is 1 only when inputs A and B are different from each other
A=0, B=1 gives X=1 → XOR outputs 1 because the two inputs are different
The XOR truth table output column for input rows 00, 01, 10, 11 (in that order) → X = 0 1 1 0
XOR is an exclusive OR: it outputs 1 when exactly one input is 1, not when both are 1 → X = A XOR B
A=1, B=1 gives X=1 for XOR → The inputs are the same, so an XOR gate outputs 0, not 1. A 1 output for 1 and 1 belongs to an OR gate.
XOR truth table output: 0 1 1 1 → The last row (both inputs 1) should be 0, so the correct column is 0 1 1 0. The column 0 1 1 1 is the OR gate.

Key Term

X = A XOR B
The XOR (exclusive OR, or EOR) gate has two inputs and outputs 1 only when the inputs are different. Its truth table output is 0 1 1 0. Its symbol is the OR shape with an extra curve at the input.

Fill in the Blanks

1. X = A XOR B
Hint: Type the gate name that goes between the inputs in this expression.
2. X = A EOR B
Hint: Type the other name for the exclusive OR gate, which is written as three letters.
3. A = 1, B = 1, so X = 0
Hint: Type the output when both inputs are the same.
4. A = 0, B = 1, so X = 1
Hint: Type the output when the two inputs are different.
5. XOR output column: 0 1 1 0
Hint: Type the second output value in the XOR truth table, where the inputs are 0 and 1.

Spot the Error

Question 1
A A B X
B 0 0 0
C 0 1 0
D 1 0 1
E 1 1 0
Line C — The inputs 0 and 1 are different, so an XOR gate outputs 1. The row should be 0 1 1.
Question 2
A A ← 1
B B ← 0
C IF A <> B THEN
D X ← 0
E ENDIF
Line D — XOR outputs 1 when the inputs are different. A and B differ here, so the line should be X ← 1.
Question 3
A Gate: XOR
B X = A NOR B
C A = 1, B = 0
D X = 1
Line B — The gate is XOR, so the expression must be X = A XOR B. A NOR gate would output 0 for these inputs.
Question 4
A A = 1, B = 0
B A and B are the same
C XOR outputs 0 when same
D X = 0
Line A — The next line says A and B are the same and X is 0. So the inputs must both be 1, not 1 and 0.
Question 5
A XOR gate facts
B Inputs: A and B
C X is 1 if A and B are equal
D Output column: 0 1 1 0
Line C — An XOR gate outputs 1 only when the inputs are different, not when they are equal.

Student with a class code? Join your class →