Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksToolsOpen the lab →

Logic gates in Minecraft: how redstone builds each one

Minecraft's redstone can build every logic gate. The Minecraft Wiki's logic page treats each gate as something that takes inputs that are on or off and returns an output that follows them, sometimes with a delay of a tick or two. Its building blocks are few: a redstone torch with one input is an inverter, "the most commonly used NOT gate"; a torch with two or more inputs is a NOR gate, "a basic logic gate"; plain dust joining inputs is an OR; and the rest are built from those. Every redstone gate is the same logic a chip uses, so a gate you understand here is a gate you can build there.

How redstone builds each gate

The wiki's recipes show the logic clearly. AND is usually a NOR gate with inverted inputs: a torch inverts A, another inverts B, a wire ORs them, and a final torch inverts the result, which is De Morgan's law in blocks. NAND is the reverse of AND. OR can be bare wire, though that lets the inputs affect each other, so torch and repeater versions keep them apart. XOR has many designs: torch-only ones (the wiki names design F the most widely used), a faster piston design, and a flat, silent comparator "subtraction XOR gate" that needs nether quartz. XNOR is an XOR with its output or one input inverted. The wiki also notes that every gate can be made from NOR gates alone, and chaining XOR gates gives an output that is on when an odd number of inputs are on. (digiwleea is an independent project, not affiliated with Mojang or Microsoft.)

The same gates, live, and what a chip does differently

The table below links each gate to its truth table and a live version you can click through, and to the same gate built from CMOS transistors, the way a real chip makes it. Two differences are worth knowing. Real chips are built mostly from NAND and NOR, because a CMOS NAND or NOR needs only four transistors, while AND and OR each need an extra inverter stage; in redstone NOR is the cheap one because it is a single torch. And a chip's gates switch in nanoseconds instead of redstone ticks. When you are ready to put gates together, the redstone computer guide lists the adders, memory and CPU parts, each built live here.

Redstonedigiwleea
NOTA redstone torch with one inputCMOS inverter: 2 transistors
NORA torch with two or more inputsCMOS NOR: 4 transistors
ORDust joining the inputs (or torches and repeaters)NOR plus an inverter: 6 transistors
ANDTorches invert A and B, dust ORs them, a torch invertsNAND plus an inverter: 6 transistors
XORTorch, piston or comparator designs12 transistors in the CMOS design built here
SpeedTicks; each torch adds delayNanoseconds in a real chip

Every gate, live

GateOutput is on whenTry it
NOTthe input is offNOT truth table, live; from transistors
ORat least one input is onOR truth table, live; from transistors
NORno input is onNOR truth table, live; from transistors
ANDall inputs are onAND truth table, live; from transistors
NANDnot all inputs are onNAND truth table, live; from transistors
XORexactly one of two inputs is onXOR truth table, live; from transistors
XNORboth inputs are the sameXNOR truth table, live

Redstone builds everything from NOR; you can do the same here with NOT, OR and AND from NOR gates and XOR from NOR gates. The Minecraft Wiki also covers IMPLY (off only when A is on and B is off), which in ordinary logic is (NOT A) OR B.

No sign-up is needed to start: open the lab and place your first transistor, or read the free theory course. The account (and the AI tutor) are optional.

See for yourself: build a logic gate from transistors in the simulator, then follow the path from sand to an 8-bit CPU.

Open the digiwleea lab →

Frequently asked

How do you make a NOT gate in Minecraft?

With a redstone torch: power the block the torch is attached to and the torch turns off, unpower it and the torch turns on. The Minecraft Wiki calls this torch inverter the most commonly used NOT gate.

How do you make an AND gate in Minecraft?

The usual design is a NOR gate with inverted inputs: a torch inverts each input, the two inverted signals join on dust (an OR), and a final torch inverts that, so the output is on only when both inputs are on.

How do you make an XOR gate in Minecraft?

There are several designs: torch-only ones, a faster and more compact piston design, and a flat comparator design (the subtraction XOR gate) that needs nether quartz. All give an output that is on when exactly one of the two inputs is on.

Why is NOR the basic gate in redstone?

Because a single redstone torch with two or more inputs is already a NOR gate, and every other gate can be built from NOR gates. In real CMOS chips NAND and NOR are the cheapest gates for the same reason: each is a single stage of transistors.

Can you build a computer in Minecraft?

Yes, from these gates: adders, an ALU, memory and control logic, the same parts a real CPU has. The redstone computer guide on this site lists each part with a live version to study first.