AND and NAND Gate

An AND gate is a foundational redstone logic circuit that only sends an output signal when both of its inputs are active at the same time. A NAND gate does the exact opposite, keeping the output turned on unless all inputs are activated together. These simple circuits are essential for multi-switch security doors, master override locks, and complex automation.

Logic GatesBeginnerBedrock Edition
AND and NAND Gate video tutorial

Video: Redstone Basics - AND/NAND Gates | NoobStone | Minecraft Bedrock Edition 1.19 Redstone Tutorial by NoobCraft

How to build it

  1. Set Up Your Two Inputs

    Place two solid blocks with a one-block gap between them and attach a lever, button, or incoming signal line to the front of each block to act as Input A and Input B.

  2. Invert Both Inputs (Standard Torch AND Gate)

    For the most common and compact design, attach a redstone torch to the back of Input Block A and another redstone torch to the back of Input Block B.

  3. Bridge the Signals

    Place a third solid block centrally behind the two torches, then run redstone dust connecting both input torches onto the top of that central block.

  4. Add the Output Torch

    Place a third redstone torch on the back of the central block facing your output device. This torch will stay off until both Input A and Input B are powered.

  5. Convert to a NAND Gate

    To turn the standard AND gate into a NAND gate, remove the final output torch and the central raised block, then simply run redstone dust directly from the line connecting the two input torches to your output.

  6. Alternative 1: Sticky Piston AND Gate

    Point a redstone repeater into your output with a one-block gap behind it. Run redstone dust from Input A to the other side of that gap, and wire Input B to a sticky piston positioned to push a solid block into the gap in front of the repeater.

  7. Alternative 2: Comparator AND Gate

    Point a redstone comparator into your output and connect Input A to its rear input using two pieces of redstone dust. Connect Input B with dust to a solid block holding a redstone torch, and place a single piece of redstone dust from that torch into the side of the comparator.

How it works

Each of the designs achieves the same logic truth table using different redstone mechanics:

  • Redstone Torch AND Gate: Built by inverting the inputs of a basic NOR gate. When either Input A or Input B is off, its corresponding rear redstone torch stays lit and powers the connecting redstone dust line and central block, which forces the final output torch off. Only when both Input A and Input B are turned on do both rear torches turn off, unpowering the central block and allowing the output torch to turn on.
  • Redstone Torch NAND Gate: Because a NAND gate is just an inverted AND gate, removing the final output torch removes the second inversion. The shared dust line stays powered whenever at least one input is off, and only goes dark when both inputs are turned on.
  • Sticky Piston AND Gate: Input A provides the electrical power while Input B acts as a physical switch. Input A's dust cannot reach the repeater across the air gap unless Input B activates the sticky piston to push a solid conductive block in front of the repeater.
  • Comparator AND Gate: In comparison mode, a comparator only outputs a signal if the rear input is greater than or equal to the side input. Input A travels through two dust, dropping from signal strength 15 to 14 at the rear of the comparator. Meanwhile, the unpowered torch on side B feeds a signal strength of 15 through a single dust into the comparator's side, blocking the output. Turning on Input B turns off the side torch (dropping the side input to 0), allowing Input A's strength 14 signal to pass through.

Tips & variations

  • Adding More Inputs (3+ Input AND Gate): The redstone torch version is the easiest to expand. Simply add more input blocks with torches on the back and link all of their outputs into the same redstone dust line before the final output block.
  • Master Override Door Lock: A great survival use is wiring a button outside a door as Input A and a lever inside your base as Input B. The outside button will only open the door when the inside master lever is flipped to the unlocked position.
  • Silent vs. Mechanical: Use the torch or comparator design if you want a completely silent circuit; the sticky piston version makes piston noise every time Input B toggles.

Frequently asked questions

What is the difference between an AND gate and a NAND gate in Minecraft?
An AND gate turns the output ON only when both inputs are ON. A NAND (Not-AND) gate does the reverse: the output stays ON at all times except when both inputs are turned ON together.
Which AND gate design is best for more than two levers?
The redstone torch design is best for 3 or more inputs because you can simply connect additional inverted input torches to the central redstone dust line without having to daisy-chain multiple gates.
Why does the comparator AND gate need two redstone dust on Input A?
Using two pieces of dust drops Input A's signal strength to 14 so that the side torch's signal strength of 15 (through one piece of dust) is strong enough to block it until Input B turns that torch off.

Components used

More and gate