Redstone NAND Gate

A Redstone NAND gate is a fundamental logic circuit that combines the functions of an AND gate and a NOT gate. It keeps its output signal powered on at all times unless both of its input switches are turned on simultaneously. This simple mechanism is essential for building security locks, combination systems, and more advanced redstone computers.

Logic GatesBeginnerJava Edition
Redstone NAND Gate video tutorial

Video: Minecraft Logic Gates 4 - NAND gate [Tutorial] by Sw1Ftx16

How to build it

  1. Place the Base Blocks

    Place three solid building blocks in a straight horizontal row on the ground.

  2. Add the Redstone Torches

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

  3. Connect the Output Line

    Place a piece of redstone dust on top of the middle block between the two torches, and lead another piece of dust out from the front of the middle block to serve as your output.

  4. Attach the Inputs

    Place a lever on the back side of the left block and another lever on the back side of the right block to control the two torches.

How it works

The NAND (Not-AND) gate works by inverting the inputs using two redstone torches and merging their signals into a single redstone dust line:

  • Default State (0, 0): When both input levers are off, both redstone torches on top of the outer blocks remain lit. They both power the redstone dust on the center block, keeping the output ON.
  • Single Input (1, 0 or 0, 1): If you flip only one lever on, it powers its attached block and turns off the redstone torch on top of it. However, the torch on the other side remains lit and continues to power the center redstone dust, so the output stays ON.
  • Both Inputs Active (1, 1): When both levers are switched on at the same time, both outer blocks become powered, which turns off both redstone torches. With no power source left to feed the center redstone dust, the output turns OFF.

Tips & variations

  • Relation to an AND Gate: A standard Minecraft AND gate is actually just a NAND gate with an extra redstone torch placed on the front of the center block to invert the output. Removing that front torch leaves you with a faster, simpler NAND gate.
  • Input Placement: You do not have to attach levers directly to the blocks. You can also run two separate lines of redstone dust directly into the back or outer sides of the two torch-holding blocks.
  • Block Choice: Make sure to use solid, opaque building blocks (like stone, wool, or concrete) so the levers can properly power the blocks and deactivate the torches.

Frequently asked questions

What is the difference between an AND gate and a NAND gate in Minecraft?
An AND gate only turns its output ON when both inputs are on. A NAND gate does the exact opposite: its output stays ON by default and only turns OFF when both inputs are on. In Minecraft, a NAND gate is simply an AND gate without the final inverting redstone torch on the front.
Can I put the input levers on the sides of the blocks instead of the back?
Yes, you can attach the levers or run redstone dust into the outer sides of the two end blocks as long as they directly power the blocks holding the redstone torches.
Does this NAND gate work in Minecraft Bedrock Edition?
While demonstrated in Java Edition, basic redstone torch inversion and dust logic behave identically in Bedrock Edition, so this design works in any version of Minecraft.

Components used

More nand gate