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) |
How to Build
- 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.
Build Variants
- ▸5-torch XOR (classic, uses 5 redstone torches)
- ▸Comparator XOR (two comparators in subtract mode, outputs merged)
- ▸Compact 2-wide XOR (tileable design using repeaters)
- ▸Piston-based XOR (using block placement to break signal paths)