XOR GATE (EXCLUSIVE OR)
Outputs ON when exactly one input is ON, but not both. Essential for toggle circuits, binary adders, and parity checks. More complex to build than basic gates.

Truth Table
| Input A | Input B | Output |
|---|---|---|
| 0 (OFF) | 0 (OFF) | 0 (OFF) |
| 0 (OFF) | 1 (ON) | 1 (ON) |
| 1 (ON) | 0 (OFF) | 1 (ON) |
| 1 (ON) | 1 (ON) | 0 (OFF) |
Reading the XOR Gate (Exclusive OR) truth table
The XOR Gate (Exclusive OR) table has 4 rows for 2 inputs, and 2 of them come out on.
An XOR Gate (Exclusive OR) outputs power on exactly two input patterns: A off and B on or A on and B off.
The XNOR Gate (Exclusive NOR) is the XOR Gate (Exclusive OR) with an inverter bolted on. All 4 rows come out the other way round.
Closest to the XOR Gate (Exclusive OR) sit the NAND Gate and OR Gate, which differ on a single row of the table, so a wiring mistake between them is easy to make and easy to miss.
How far the other gates sit from XOR Gate (Exclusive OR)
The material cost of one XOR Gate (Exclusive OR)
Adding up the recipes behind those parts, one XOR Gate (Exclusive OR) costs 10 crafting ingredients in total: 5 Redstone and 5 Stick.
You can read up on Redstone Torch, Redstone Repeater and Redstone Comparator separately; those pages carry the delay and power figures this XOR Gate (Exclusive OR) depends on.
| Part used in XOR Gate (Exclusive OR) | How many per XOR Gate (Exclusive OR) | Crafting cost of a single one |
|---|---|---|
| 5 | 1 Redstone, 1 Stick | |
| as many as the build needs | 3 Stone, 2 Redstone Torch, 1 Redstone | |
| as many as the build needs | 3 Redstone Torch, 3 Stone, 1 Quartz | |
| as many as the build needs | 4 Cobblestone, 3 Planks, 1 Iron Ingot, 1 Redstone |
The full shopping list for XOR Gate (Exclusive OR)
5 Redstone
5 Stick
Prices for XOR Gate (Exclusive OR) are read straight off the recipes in Java Edition 26.2.
The XOR Gate (Exclusive OR) in short: what it is and what it does
Outputs ON when exactly one input is ON, but not both. Essential for toggle circuits, binary adders, and parity checks. More complex to build than basic gates.
In plain terms, the output is on when exactly one input is on, but off when both are on or both are off. XOR is the difference detector, and it is the heart of binary adders and parity checks, a half-adder's sum bit is literally an XOR of the two inputs.
This page describes the XOR Gate (Exclusive OR) as it behaves in Java Edition 26.2; the truth table and timings below match vanilla redstone exactly.
How the XOR Gate (Exclusive OR) works: the redstone mechanics
Across its four input combinations the output is on in 2 cases, A off with B on and A on with B off, and off in the remaining 2.
Expressed as boolean algebra that is output = A XOR B.
The classic 5-torch XOR adds about 2-3 redstone ticks depending on which path the signal takes.
Because redstone signals are just on or off, "on" here means a powered line (signal 1-15) and "off" means an unpowered line (signal 0); the XOR Gate (Exclusive OR) cares only about presence or absence of power, not its exact strength.
How to build the XOR Gate (Exclusive OR)
- 1Place two input lines A and B.
- 2Build a NOT gate for input A (block + torch) and route it alongside input B.
- 3Build a NOT gate for input B (block + torch) and route it alongside input A.
- 4Create two AND gate paths: (A AND NOT B) and (NOT A AND B).
- 5OR the two AND outputs together. The result is XOR.
- 6Alternative: Use comparators in subtract mode, A comparator subtracts B, and B comparator subtracts A. OR the outputs.
- 7Verify it against the truth table: setting the inputs to OFF and ON should drive the output ON. Walk through all 4 input combinations once to confirm the gate matches the table above.
Uses & applications
- ▸XOR is the difference detector, and it is the heart of binary adders and parity checks, a half-adder's sum bit is literally an XOR of the two inputs.
- ▸5-torch XOR (classic, uses 5 redstone torches), a practical build choice for this gate.
- ▸Comparator XOR (two comparators in subtract mode, outputs merged), a practical build choice for this gate.
- ▸Compact 2-wide XOR (tileable design using repeaters), a practical build choice for this gate.
- ▸Piston-based XOR (using block placement to break signal paths), a practical build choice for this gate.
Tips & common mistakes
- !Keep your inputs isolated with repeaters if signals are flowing back into each other; uncontrolled backflow between dust lines is the most common reason a gate reads the wrong value.
- !Remember the propagation cost: the classic 5-torch XOR adds about 2-3 redstone ticks depending on which path the signal takes. If you chain several gates, those ticks add up and can desynchronise a fast circuit.
- !When a multi-gate circuit misbehaves, test each gate in isolation against its own truth table before assuming the wiring between them is at fault.
XOR Gate (Exclusive OR) FAQ: the questions people ask

What does a XOR Gate (Exclusive OR) do in Minecraft?
A XOR Gate (Exclusive OR) outputs a signal where the output is on when exactly one input is on, but off when both are on or both are off. In boolean terms, output = A XOR B.

What is the truth table of a XOR Gate (Exclusive OR)?
Across its four input combinations the output is on in 2 cases, A off with B on and A on with B off, and off in the remaining 2. The boolean expression is output = A XOR B.

How do you build a XOR Gate (Exclusive OR) with redstone?
Place two input lines A and B. Build a NOT gate for input A (block + torch) and route it alongside input B. Common variants include 5-torch XOR (classic, uses 5 redstone torches) and comparator XOR (two comparators in subtract mode, outputs merged).

How much delay does a XOR Gate (Exclusive OR) add?
The classic 5-torch XOR adds about 2-3 redstone ticks depending on which path the signal takes. That matters most in clocks and adders where every redstone tick counts.

Why is XOR important for redstone adders?
In binary addition the sum bit of two inputs is exactly their XOR, and the carry bit is their AND. A half-adder is therefore just an XOR gate and an AND gate side by side, which is why XOR shows up at the core of every redstone calculator.





