Learn in your language
Skip to content
IGCSE · Cambridge (CIE) · 0478

Apply the XOR gate

Use XOR/EOR when exactly one of two inputs is true.

Cambridge IGCSE Computer Science 0478 · Boolean logic · 2026–2028 Version 6 · Topic 10
Exam scope and assessment notes

This original learning sequence follows Topic 10 of Cambridge IGCSE Computer Science 0478, 2026–2028 syllabus Version 6. 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.

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?

Put the idea to work

Worked example

A parity indicator is Y=A XOR B. Find Y for 0,1 and for 1,1.

Show the worked solution
  1. For 0,1 the inputs differ, so exactly one is true.
  2. 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.

1 · Guided

Complete XOR for inputs 00, 01, 10, 11.

Give me a hint

Output 1 only for differing inputs.

Compare my reasoning
  1. 00 match, output 0.
  2. 01 and 10 differ, output 1.
  3. 11 match, output 0.

0, 1, 1, 0.

Look for these in your work

  • All four cases
  • Exactly-one rule
2 · Independent

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
  1. Use XOR for differing input states.
  2. Write Lamp = S1 XOR S2.
  3. 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
3 · Transfer

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
  1. For A=1, B=1, OR outputs 1.
  2. XOR requires exactly one true input and outputs 0.
  3. 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
Recall without your notes

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.

Keep learning Computer Science

Course scope and assessment

165 original lessons map the listed objectives across all 10 main topics in the 2026–2028 Version 6 syllabus, with worked explanations and guided, independent and transfer practice. This is mapped teaching coverage, not proof of full exam readiness. Three earlier starter lessons remain available but are not counted as syllabus-mapped teaching. Practical programming experience in an executable browser workspace, full timed-paper practice, human subject-teacher review and the separate 2029–2031 syllabus remain outstanding. Practice is self-checked and does not award an official Cambridge grade.

StudyForA · Learn with understanding

Original teaching content and links to official sources. Check your exam year and qualification before using a resource.