NAND gate in redstone

AND with the output inverted. Or — OR of the two inputs' negations. Footprint 3 wide × 4 deep × 2 tall. Build it block by block in Minecraft.

How to build it

NAND is shorter than AND: you only need two inverters instead of three. By De Morgan, ¬(A ∧ B) = ¬A ∨ ¬B. Invert each input, merge the two dust lines — done.

  1. Place a solid block near each input and attach a redstone torch. The two torches now emit ¬A and ¬B.
  2. Run dust from both torches so the two lines meet at one point.
  3. Continue the merged dust out to Y.

Why it works

Two NOTs followed by an OR is a NAND — because dust-merge is OR, and OR of negated inputs is NAND by De Morgan. Two torches + a few blocks of dust.

The "universal gate" claim

NAND alone can build every other gate — AND, OR, XOR, flip-flops. If you're ever stranded on a redstone desert island with one gate, make it NAND.

Gotchas