
Video: Minecraft: Redstone - 3 Ways To Use XNOR Gates by g11g00g3r
How to build it
- Place the Entry and Exit Levers
Install one lever at the start of your obstacle (such as a gap, lava pit, or wall) and a second lever at the destination on the opposite side. In a defense scenario, keep both levers hidden so only you know their locations.
- Build the Underground XNOR Gate
Dig an underground room between the two levers and construct an XNOR logic gate using building blocks, redstone torches, and redstone dust. Run redstone dust lines from both levers into the two inputs of the gate.
- Application 1: Retractable Bridge
Line the bottom of a trench or gap with upward-facing sticky pistons topped with floor blocks. Connect the single output line of your XNOR gate to these pistons so toggling either lever raises or lowers the bridge.
- Application 2: Pop-Out Staircase
Place horizontal sticky pistons inside a wall in a stepped pattern, with stair or solid blocks attached to their faces. Wire the XNOR gate output to the pistons so pulling the bottom lever extends the stairs and pulling the top lever retracts them behind you.
- Application 3: Safe Room Escape Bridge
Create a final narrow crossing leading to a secure platform using sticky pistons connected to another XNOR gate. Flip the entrance lever to extend the walkway, cross over, and flip the platform lever to drop the bridge and trap anyone chasing you.
How it works
An XNOR gate (or XOR gate, depending on whether the output is inverted) acts like a real-world three-way light switch when wired to two Levers:
- Dual Input Control: An XNOR gate outputs a high redstone signal when both input levers are in the same state (both OFF or both ON), and turns OFF when the levers are in opposite states.
- Toggling From Either End: Because flipping either lever always changes whether the two inputs match, flipping any lever at any time will always toggle the state of the connected
Sticky Pistons. - Chase Defense: When you flip the first lever, the output turns ON and extends the bridge or staircase. Once you cross and flip the second lever, the inputs no longer match (or now match, depending on inversion), turning the output OFF and retracting the blocks behind you.
Tips & variations
- Hide Your Levers: For survival base defense or PvP escapes, conceal the levers behind corners, trapdoors, or foliage so pursuers cannot simply flip the entry lever to re-open the bridge.
- Signal Strength: Because the wiring has to travel from the entry side to the exit side underground, use
Redstone Repeatersalong the input and output lines so the signal does not run out after 15 blocks. - XNOR vs. XOR: In practical builds with two levers, an XNOR gate and an XOR gate behave identically—the only difference is which lever positions count as ON or OFF.


