Compact XOR Gate

An XOR gate is a logic circuit that turns its output on when its two inputs are in different states, and turns it off when the inputs match. In Minecraft, this is the easiest way to wire two or more independent levers to the same piston door so it never gets locked open from one side. This observer-and-dropper design is tiny, flexible, and works identically on both Java and Bedrock Edition.

Logic GatesBeginnerJava & Bedrock
Compact XOR Gate video tutorial

Video: Minecraft SUPER COMPACT XOR GATE- Works on ALL versions! by The Bow Tie Man

How to build it

  1. Place the Droppers and Hopper

    Place a dropper on the ground facing straight upward. Place a second dropper directly on top of it facing horizontally toward one side, then attach a hopper underneath that feeds back into the bottom dropper.

  2. Add the Output Comparator

    Crouch and place a redstone comparator on top of the hopper, facing away from the bottom dropper. This comparator will act as the main output for your circuit or door.

  3. Build the Input Line

    Place three solid building blocks leading into the back of the top dropper. Put a redstone repeater on the block closest to the top dropper (facing into it), and place redstone dust on the other two blocks.

  4. Install the Observers and Levers

    Place two observers so their outputs point directly into the two redstone dust lines (for example, facing downward above the dust). Attach a lever directly to the face of each observer and make sure both start in the OFF position.

  5. Insert the Filler Item

    Open the bottom dropper and place a single random filler item inside. Because both levers currently match (both OFF), the item stays in the bottom dropper and the comparator output remains off.

How it works

Unlike traditional torch-based XOR gates, this circuit combines dual edge detectors with a dropper-hopper T flip-flop:

  • Observer Dual Edge Detection: Whenever either lever is flipped ON or OFF, its attached observer detects the state change and emits a short 1-tick redstone pulse into the dust line.
  • Repeater Input: The redstone dust powers the repeater, which sends a strong pulse directly into the top dropper, activating both the top and bottom droppers simultaneously.
  • Dropper-Hopper Loop: When both levers match (OFF/OFF), the single filler item rests in the bottom dropper. Flipping one lever pulses the droppers, shooting the item up into the top dropper, which immediately ejects it into the hopper below.
  • Comparator Readout: The hopper returns the item dependably or holds it depending on which dropper fired, and the comparator reads the inventory containing the item to toggle the output signal every time any lever changes state.

Tips & variations

  • Wiring to Piston Doors: Place the output comparator directly where the door's main control lever would normally sit. Run the redstone dust lines out to the walls on either side of your doorway and place the observers and levers at convenient reach.
  • Adding 3 or More Levers: Because the circuit simply toggles every time an observer pulses the dust line, you can expand the redstone dust wire and attach as many observer-lever pairs as you want to control a single door from multiple hallways.
  • Keep Initial States Synced: Before putting the filler item into the bottom dropper, verify that both levers are turned OFF so the gate starts in the proper 0 + 0 = 0 state.
  • Cross-Platform Compatibility: Because this relies on basic observer pulses and dropper-hopper item transfer rather than quasi-connectivity, it works reliably in both Java and Bedrock Editions.

Frequently asked questions

What is an XOR gate used for in Minecraft?
An XOR gate is primarily used to control a single output, such as a piston door or lighting system, from two different levers independently so one lever never locks the other.
Does this XOR gate work on Minecraft Bedrock Edition?
Yes, this design works identically on both Minecraft Bedrock Edition and Java Edition because it uses observers and droppers rather than Java-exclusive mechanics.
Can I connect more than two levers to this circuit?
Yes! By extending the redstone dust line feeding the repeater, you can point as many observers with levers into the line as you need, and every lever will independently toggle the output.

Components used

More xor gate