1-Wide XNOR Gate

An XNOR gate is a classic logic circuit that outputs an active signal whenever both inputs are in the exact same state (both ON or both OFF). It is ideal for controlling a single door, piston, or light system from two different locations, such as a lever on the inside and outside of your base. This 1-wide vertical design packs the entire logic gate into a slim slice that easily fits inside tight walls.

Logic GatesBeginnerJava & Bedrock
1-Wide XNOR Gate video tutorial

Video: One Wide Redstone - XNOR Gate | Minecraft Redstone Tutorial by TheBCBroz

How to build it

  1. Build the Base Diamond Shape

    Start by placing a single block on the ground, then add blocks diagonally up to the left and right, plus one on top to form a four-block hollow diamond (or star) shape in a 1-wide vertical plane.

  2. Add the Upper Frame Blocks

    Extend the frame upward by placing two additional blocks above the structure and another block directly underneath the second upper block to create ledges for your redstone components.

  3. Place the Redstone Torches

    Place four redstone torches across the structure: one on the initial input block, two attached to the sides of the middle blocks, and one standing on top of the upper block.

  4. Install the Repeaters

    Place two redstone repeaters in the gaps of the frame facing toward the output side. Leave both repeaters on their default 1-tick delay.

  5. Run the Redstone Dust

    Place four pieces of redstone dust on top of the exposed blocks to connect the torches and repeaters together.

  6. Extend Input B and Add Levers

    Because the lower input block sits right next to the upper input, extend the second input line out by one extra block with a piece of redstone dust on top so the signals do not cross. Attach a lever to Input A and another to the extended Input B block to test the output.

How it works

An XNOR (Exclusive-NOR) gate compares two inputs and outputs a high signal only when both inputs match:

  • Both Inputs OFF (0, 0): The initial redstone torches remain lit, powering the internal dust and repeaters in a way that keeps the final output state ON.
  • One Input ON (1, 0 or 0, 1): Flipping either Input A or Input B inverts one branch of the torch-and-repeater network. This changes the state of the final output to OFF.
  • Both Inputs ON (1, 1): When both levers are turned on at the same time, both input torches are turned off, allowing the secondary torches in the gate to invert the signal back to ON.

Because flipping either lever always flips the current state of the output, this circuit acts as a dual-switch controller.

Tips & variations

  • Separate the Inputs: Always remember to extend the lower input out by at least one block as shown in the final step. Placing a lever directly adjacent to the other input block will power both lines at once and break the logic gate.
  • Convert to an XOR Gate: Since an XNOR gate is simply an inverted XOR gate, you can invert the final output with one extra redstone torch if you prefer the output to be OFF when both levers are off.
  • Silent Operation: Because this design relies strictly on redstone torches, dust, and repeaters rather than pistons, it operates completely silently.

Frequently asked questions

What is an XNOR gate used for in Minecraft?
An XNOR gate is most commonly used to control a single door, bridge, or lighting system from two separate levers—such as one lever outside a room and one lever inside. Flipping either lever will always toggle the door open or closed.
What is the difference between an XOR gate and an XNOR gate?
An XOR gate turns ON when the two inputs are different, whereas an XNOR gate turns ON when the two inputs are the same (both OFF or both ON). In practice, both allow two levers to toggle a single output.
Does this 1-wide XNOR gate work in both Java and Bedrock Edition?
Yes. Because this circuit only uses basic redstone torches, repeaters, and dust without relying on quasi-connectivity or piston timings, it works reliably in both Java and Bedrock editions.

Components used

More xnor gate