XOR Gate Door Control

An XOR (exclusive OR) gate lets you toggle a single device, like an iron door, independently from two different levers. Whenever either lever is flipped, the output changes state, acting just like a real-life two-way hallway light switch. You can even daisy-chain multiple XOR gates together to control one door from three or more locations.

Logic GatesBeginnerJava Edition
XOR Gate Door Control video tutorial

Video: Geoff's Minecraft XOR Gate Tutorial by Geoffrey Pouliot

How to build it

  1. Place the Base Blocks

    Choose a solid block that can support redstone components, such as clay or stone. Lay out the foundation frame for your chosen XOR gate design (6 blocks for the wider style, or 8 blocks for the more compact footprint).

  2. Attach Redstone Torches

    Mount the redstone torches onto the sides and tops of your base blocks to create the inverting logic stages of the gate.

  3. Install Redstone Repeaters

    Place the redstone repeaters inside the circuit layout. Pay close attention to the direction they are facing so the signal flows toward the output; if placed backward, the gate will not function.

  4. Add the Input Levers and Door

    Attach two levers at the input end of the circuit, either directly on the input blocks or a short distance away. Place your door at the output end of the gate.

  5. Connect the Redstone Wiring

    Run redstone dust across the tops of the blocks and along the ground to link the input levers, torches, and repeaters together, then connect the final output line to your door.

  6. Daisy-Chain for 3+ Levers (Optional)

    If you want to control the door with more than two levers, build a second XOR gate nearby. Connect the output line of your first XOR gate directly into one of the two inputs on the second XOR gate, and attach a third lever to the remaining input.

How it works

An XOR gate compares two inputs and outputs an active signal only when the two inputs are in different states (one ON, one OFF). When both levers are OFF or both levers are ON, the internal redstone torches cancel out the final output line, closing the door.

  • Both Levers OFF: The initial inverting torches stay active and hold the final output torches OFF.
  • One Lever ON: Flipping either lever turns off its corresponding input torch while leaving the other side active, allowing one branch of the gate to power the output line and open the door.
  • Both Levers ON: Powering both inputs simultaneously satisfies the central override path, turning both output branches OFF again so the door closes.

Because flipping any single lever always switches the input states from matching to different (or vice versa), every lever flip reliably toggles the door regardless of how the other lever is set.

Tips & variations

  • Choosing a Design: The 6-block layout uses fewer solid blocks, while the 8-block layout arranges the components into a tighter overall footprint that is easier to hide in walls or underground.
  • Repeater Orientation: The most common mistake when building repeater-based XOR gates is placing repeaters backward. Always ensure the small indicator torches on the repeater point from the inputs toward the door.
  • Alternative Inputs & Outputs: While levers and doors are the most popular pairing, you can wire pressure plates, buttons, or detector rails to the inputs, and connect trapdoors, pistons, dispensers, powered rails, or TNT to the output.
  • Unlimited Switches: You can chain as many XOR gates in series as you want—each extra gate adds one more independent control lever to the system.

Frequently asked questions

Why do I need an XOR gate to use two levers on one door?
If you wire two levers directly to a door with plain redstone dust, turning one lever ON locks the door open permanently regardless of what you do with the second lever. An XOR gate ensures either lever can open or close the door at any time.
How do I control a door with three or more levers?
Build multiple XOR gates and daisy-chain them together by wiring the output of the first XOR gate into one of the inputs of the next XOR gate.
What blocks can I use to build the XOR gate?
You can use any solid, opaque building block that allows redstone dust, repeaters, and torches to be attached, such as clay, cobblestone, stone bricks, or wool.

Components used

More xor gate