LOGIC GATES
Every logic gate you can build with Minecraft redstone. Truth tables, step-by-step instructions, and compact variants.
A logic gate turns one or two inputs into a single output, and every redstone machine bigger than a lamp on a lever is built out of them. This page has all 7: NOT, AND, OR, NOR, NAND, XOR and XNOR.
1 of the 7 takes a single input and the rest take two, which is why most of the truth tables below have four rows. 6 of them have an exact opposite in this list, so adding one redstone torch to the output turns one gate into another. Together the 7 pages carry 35 build steps.
The table compares them at a glance: how many inputs, how many rows come out on, which gate is its mirror image, and how many torches the cheapest design named on that page uses.


NOT Gate (Inverter)
The simplest logic gate. Inverts the input signal, when input is ON, output is OFF, and vice versa. Built with a single redstone torch. The foundation for all other gates.
| IN | OUT |
|---|---|
| 0 | 1 |
| 1 | 0 |

AND Gate
Outputs ON only when ALL inputs are ON. Built by combining two NOT gates into a NOR configuration on the inverted inputs, or by using redstone torches. Essential for requiring multiple conditions to be true simultaneously.
| A | B | OUT |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |

OR Gate
Outputs ON when ANY input is ON. The simplest multi-input gate, just merge two redstone dust lines into one. No torches needed for basic OR functionality.
| A | B | OUT |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |

NOR Gate
Outputs ON only when ALL inputs are OFF. The inverse of an OR gate. Built by feeding an OR gate through a NOT gate. Fundamental to RS NOR latches (memory circuits).
| A | B | OUT |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |

NAND Gate
Outputs ON unless ALL inputs are ON. The inverse of an AND gate. NAND is functionally complete, any logic circuit can be built using only NAND gates.
| A | B | OUT |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |

XOR Gate (Exclusive OR)
Outputs ON when exactly one input is ON, but not both. Essential for toggle circuits, binary adders, and parity checks. More complex to build than basic gates.
| A | B | OUT |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |

XNOR Gate (Exclusive NOR)
Outputs ON when both inputs are the same (both ON or both OFF). The inverse of XOR. Used for equality comparison, combination locks, and parity circuits.
| A | B | OUT |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
All 7 redstone logic gates compared
Every gate with its number of inputs, how many rows of its truth table output on, which gate is its exact opposite, how many build steps it takes and how many torches the cheapest design uses.
| Gate | Inputs | Rows on | Opposite gate | Build steps | Torches |
|---|---|---|---|---|---|
| 1 | 1 of 2 | none in this list | 5 | 1 | |
| 2 | 1 of 4 | NAND Gate | 5 | 3 | |
| 2 | 3 of 4 | NOR Gate | 5 | varies | |
| 2 | 1 of 4 | OR Gate | 5 | varies | |
| 2 | 3 of 4 | AND Gate | 5 | 2 | |
| 2 | 2 of 4 | XNOR Gate (Exclusive NOR) | 6 | 5 | |
| 2 | 2 of 4 | XOR Gate (Exclusive OR) | 4 | 6 |
Questions about redstone logic gates
How many logic gates can you build with redstone?
Seven cover everything you need: NOT, AND, OR, NOR, NAND, XOR and XNOR. Any larger circuit, from a door to a calculator, is a combination of those 7.
Which redstone logic gate is the cheapest to build?
The NOT Gate (Inverter) needs the fewest redstone torches, 1 in the design named on its page, against 6 for the XNOR Gate (Exclusive NOR). Torches are the real cost of a gate, because dust and blocks you already have.
Which logic gates are the exact opposite of each other?
AND Gate and NAND Gate; NOR Gate and OR Gate; XNOR Gate (Exclusive NOR) and XOR Gate (Exclusive OR). Every row of the table flips, so one redstone torch on the output turns either into the other. That also means you never have to memorise both.
Which two logic gates are easiest to mix up?
The pairs that differ on a single row: AND Gate and the XNOR Gate (Exclusive NOR); OR Gate and the XOR Gate (Exclusive OR); NOR Gate and the XNOR Gate (Exclusive NOR); NAND Gate and the XOR Gate (Exclusive OR). One wrong torch and you have built the other one, and the output looks right in three of the four states.
Which redstone gate takes the most steps to build?
The XOR Gate (Exclusive OR), at 6 steps on its page. The fewest steps are listed for the XNOR Gate (Exclusive NOR), which takes 4, though that one leans on a gate you have already built.
Do redstone logic gates work the same on Bedrock?
The truth tables do, because they are logic and not blocks. The timings and the quasi-connectivity tricks do not: quasi-connectivity is Java Edition only, and it is explained on its own page. Build a gate out of torches and dust and it behaves the same in both editions.
