The XOR (EOR) gate

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

The XOR (EOR) gate

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. An XOR gate has inputs A = 1 and B = 0. What is the output X?
A X = 1
B X = 0
2. An XOR gate has inputs A = 1 and B = 1. What is the output X?
A X = 1
B X = 0
3. Which output column (rows 00, 01, 10, 11) matches an XOR gate?
A 0 1 1 1
B 0 1 1 0
4. Which logic expression describes an XOR gate?
A X = A XOR B
B X = A XNOR B
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

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1X = A XOR B AThe output X is 1 only when inputs A and B are different from each other
2A=0, B=1 gives X=1 BX = 0 1 1 0
3The XOR truth table output column for input rows 00, 01, 10, 11 (in that order) CThe inputs are the same, so an XOR gate outputs 0, not 1. A 1 output for 1 and 1 belongs to an OR gate.
4XOR is an exclusive OR: it outputs 1 when exactly one input is 1, not when both are 1 DThe 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.
5A=1, B=1 gives X=1 for XOR EX = A XOR B
6XOR truth table output: 0 1 1 1 FXOR outputs 1 because the two inputs are different

Definitions

X = A XOR B

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
X = A ___ B
2.
X = A ___ B
3.
A = 1, B = 1, so X = _
4.
A = 0, B = 1, so X = _
5.
XOR output column: 0 _ 1 0

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A A B X
B 0 0 0
C 0 1 0
D 1 0 1
E 1 1 0
Question 2
A A ← 1
B B ← 0
C IF A <> B THEN
D X ← 0
E ENDIF
Question 3
A Gate: XOR
B X = A NOR B
C A = 1, B = 0
D X = 1
Question 4
A A = 1, B = 0
B A and B are the same
C XOR outputs 0 when same
D X = 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

Answer Key

The XOR (EOR) gate
Section A: Quick Questions
Q1
A — X = 1
Q2
B — X = 0
Q3
B — 0 1 1 0
Q4
A — X = A XOR B
Q5
A — It has an extra curved line at the input side
Section B: Match the Pairs
Q1
X = A XOR B → The output X is 1 only when inputs A and B are different from each other
Q2
A=0, B=1 gives X=1 → XOR outputs 1 because the two inputs are different
Q3
The XOR truth table output column for input rows 00, 01, 10, 11 (in that order) → X = 0 1 1 0
Q4
XOR is an exclusive OR: it outputs 1 when exactly one input is 1, not when both are 1 → X = A XOR B
Q5
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.
Q6
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.
Section C: Definitions
Q1
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.
Section D: Fill in the Blanks
Q1
X = A XOR B
Q2
X = A EOR B
Q3
A = 1, B = 1, so X = 0
Q4
A = 0, B = 1, so X = 1
Q5
XOR output column: 0 1 1 0
Section E: Spot the Error
Q1
C — The inputs 0 and 1 are different, so an XOR gate outputs 1. The row should be 0 1 1.
Q2
D — XOR outputs 1 when the inputs are different. A and B differ here, so the line should be X ← 1.
Q3
B — The gate is XOR, so the expression must be X = A XOR B. A NOR gate would output 0 for these inputs.
Q4
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.
Q5
C — An XOR gate outputs 1 only when the inputs are different, not when they are equal.