NAND Gate

A NAND gate is a fundamental redstone logic circuit that outputs an active signal at all times, except when both of its inputs are turned on at the same time. It works as the exact opposite of a standard AND gate. You can use it in survival bases for dual-lever security doors or automated systems that should only shut off when multiple conditions are met.

Logic GatesBeginnerJava Edition
NAND Gate video tutorial

Video: Minecraft: Redstone Mini-Series - NAND Gate by ExtensionCoders

How to build it

  1. Place the Base Blocks

    Place three solid building blocks in a horizontal row on the ground to form the foundation of the logic gate.

  2. Add the Input Torches

    Place one redstone torch on the top of the left block and another redstone torch on the top of the right block, leaving the center block empty.

  3. Connect the Center Redstone Dust

    Place a piece of redstone dust on top of the middle block between the two torches. Unlike an AND gate, you do not place an inverting torch on the front of the center block.

  4. Attach the Input Levers

    Place two levers on the input side of the outer blocks (or connect them via short redstone dust lines) so that each lever powers one of the blocks holding a redstone torch.

  5. Wire the Output Door

    Run a trail of redstone dust from the center block directly to your door. The door will start in the open position while both levers are off.

How it works

The NAND (Not-AND) gate operates by taking the standard AND gate design and removing the final inverting redstone torch, replacing that connection directly with redstone dust.

  • Inputs OFF (0, 0): Neither outer block is powered, so both redstone torches on top remain lit. They both power the center redstone dust, keeping the output line active and the door open.
  • One Input ON (1, 0 or 0, 1): Flipping one lever powers its corresponding block and turns off the torch on top of it. However, the other torch remains lit and continues powering the center redstone dust, so the door stays open.
  • Both Inputs ON (1, 1): When both levers are switched on, both outer blocks become powered, which extinguishes both redstone torches simultaneously. With no power reaching the center redstone dust, the output signal turns off and the door closes.

Tips & variations

  • AND Gate Conversion: If you already have an AND gate built, simply break the output redstone torch on the side of the center block and run redstone dust straight from the center block instead.
  • Common Mistake: Make sure your input levers directly power the blocks directly underneath the two redstone torches; otherwise, the torches will never turn off when you flip the switches.
  • Compatibility: Because this circuit only uses basic redstone dust and torch inversion, it works reliably across all versions of Minecraft.

Frequently asked questions

How is a NAND gate different from an AND gate in Minecraft?
An AND gate has an extra redstone torch on the output block that inverts the signal so it only turns on when both inputs are on. A NAND gate removes that torch and replaces it with redstone dust, making the output stay on until both inputs are activated.
When does the door close in a NAND gate circuit?
The door only closes when both input levers are switched to the ON position at the same time. In every other combination, the door stays open.
Can I connect other mechanisms besides a door?
Yes, you can connect the output redstone dust line to pistons, redstone lamps, trapdoors, or larger logic circuits.

Components used

More nand gate