
Video: Redstone Basics - AND/NAND Gates | NoobStone | Minecraft Bedrock Edition 1.19 Redstone Tutorial by NoobCraft
How to build it
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
15to14at the rear of the comparator. Meanwhile, the unpowered torch on side B feeds a signal strength of15through a single dust into the comparator's side, blocking the output. Turning on Input B turns off the side torch (dropping the side input to0), allowing Input A's strength14signal 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.


