Apply the XOR gate
Use XOR/EOR when exactly one of two inputs is true.
Exam scope and assessment notes
This original learning sequence follows Topic 10 of Cambridge IGCSE Computer Science 0984, 2026–2028 syllabus Version 4. It covers standard symbols and functions for NOT, AND, OR, NAND, NOR and XOR/EOR, and translation among statements, expressions, circuits and truth tables. NOT has one input; other gates have at most two. Circuit practice is limited to three inputs and one output and keeps the requested design without simplification. Lessons and checks support learning but do not award an official Cambridge grade. Full timed-paper practice, practical programming in an executable workspace and human subject-teacher review remain outstanding; the separate 2029–2031 syllabus is not mapped here. Cambridge states that 0984 has the same 2026–2028 subject content as 0478, with 9–1 grading. In June and November, Cambridge lists 0984 in Administrative zone 3 and for centres in Oman and the UAE. Confirm availability for your centre and exam series with Cambridge International. The separately published 2029–2031 syllabus changes to Python 3 only and removes pseudocode; this 2026–2028 route does not cover those changes.
Before you begin
- Be able to read binary 0 and 1 as the two possible logic values. Each lesson introduces the gate or translation skill it uses.
Work on paper. Try each question before revealing help, and explain why your method works.
Quick readiness check
Which pair makes XOR true?
What you will learn
- Distinguish XOR from OR
- Evaluate XOR for all two-input rows
- Use XOR in a simple condition
Core idea
XOR, also called EOR, returns 1 when exactly one input is 1. It returns 0 when both inputs are the same: both 0 or both 1. Unlike ordinary OR, XOR is false when both inputs are true.
In a logic circuit, 1 represents TRUE and 0 represents FALSE. A gate applies a defined rule to its input value or values and produces one binary output.
A reliable method
Compare the two inputs. If they differ, output 1; if they match, output 0. The four-row sequence is 00→0, 01→1, 10→1, 11→0.
Keep the given statement, expression, diagram or table in view while working. Check each row or connection against the rule, and preserve the stated circuit structure; the syllabus does not ask you to simplify it.
Pause and explain
How does XOR differ from OR on input 1,1?
Worked example
A parity indicator is Y=A XOR B. Find Y for 0,1 and for 1,1.
Show the worked solution
- For 0,1 the inputs differ, so exactly one is true.
- For 1,1 both inputs are true, so exactly-one is false.
Answer Y=1 for 0,1; Y=0 for 1,1.
Try a topic test
Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.
Test this topic →From guided practice to a new situation
Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.
Complete XOR for inputs 00, 01, 10, 11.
Give me a hint
Output 1 only for differing inputs.
Compare my reasoning
- 00 match, output 0.
- 01 and 10 differ, output 1.
- 11 match, output 0.
0, 1, 1, 0.
Look for these in your work
- All four cases
- Exactly-one rule
A room's two switches should turn a lamp on when their positions differ. Write the expression and give the result for switches 1 and 1.
Give me a hint
The condition is exactly one switch on.
Compare my reasoning
- Use XOR for differing input states.
- Write Lamp = S1 XOR S2.
- The two given values match, so output 0.
Lamp = S1 XOR S2; for 1,1 the output is 0.
Look for these in your work
- Expression
- Case evaluated
A student claims OR and XOR always produce the same result. Give one counterexample and explain it.
Give me a hint
Choose the row where both inputs are 1.
Compare my reasoning
- For A=1, B=1, OR outputs 1.
- XOR requires exactly one true input and outputs 0.
- This row disproves the claim.
At 1,1, OR=1 but XOR=0 because both inputs are true.
Look for these in your work
- Counterexample
- Difference explained
Common mistakes
- Treating XOR as ordinary OR
- Saying XOR means both inputs must be true
- Forgetting that equal inputs produce 0
What can you explain now?
What is 1 XOR 1?
Compare with the explanation
0
XOR is true only when exactly one input is 1.
After trying it yourself, choose your next review. This is your self-assessment.
Your review choice appears on Today. Sign in to sync it across devices.
Make it stick
State the XOR rule in the fewest words you can.
If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.