The technical side of Minecraft is one of the most interesting aspects of the game, but it can be quite overwhelming for players who are just getting started with it. There is a lot to learn about Redstone, but simple logic gates are a fantastic place to start. They are essential to know for Redstone projects of any size, from simple automatic farms to massive calculators, and are great for learning the basics of how different Redstone items function with each other.

For those who don't know, logic gates are devices that consist of one or more inputs and a single binary output. Different situations call for different types of logic gates. For example, a player may want to have a door that only opens if a specific set of levers are activated, or they may want a set of buttons that only work when pressed in the correct order. This is where these devices come in.

How To Build Logic Gates In Minecraft

Minecraft - locked combination door

It should be noted that each and every type of logic gate can be created in multiple different ways. This guide will cover the most common and simplistic designs, but players can make use of the reasoning behind why they work to construct them in different ways. As long as the same logic is applied, they should work all the same.

Input/Output And NOT Gates

Minecraft - standard and NOT gates

Pictured above are the two most common logic gates in the game. The left is a standard input/output gate, meaning that when the input is triggered, it sends a signal to an output and something will occur (in this case, a light will turn on). The right gate pictured is a NOT gate, alternatively known as an inverter, and this is the primary purpose that redstone torches serve. Redstone torches are active and outputting a signal by default, but powering them will turn them off. This means that in this example, the light is turned on by default, but flicking the switch deactivates it.

These two gates are rather self-explanatory, but they are the building blocks of every other logic gate in the game. What's important to note is that the NOT gate can be appended to the output of any other type of gate to inverse the signal. Whenever players want the default state to be "on" or "open", use a torch.

AND And OR Gates

Minecraft - AND gate and OR gate

An OR gate, pictured right, is a device that can be powered by any one of a number of inputs. Setting up one of these is as simple as running multiple wires to the same output, with nothing more to it. This can be useful for players looking to be able to open Redstone doors from either side or for those who want to have toggle switches for their XP farms that can be triggered from multiple different areas.

An AND gate, pictured on the left, is a circuit that requires input from multiple sources to trigger an output. In this example, the light would turn on only if both the blue input and the yellow input were triggered, hence the name. This works, because if either of the two torches above the levers are still active, the connecting Redstone dust will be active. If that dust is active, then the torch on the side of the block will stay turned off. Thus, in order for it to turn on, both torches must be inactive. This simple example uses just two inputs, but so long as all torches are connected by a continuous wire, they can be extended indefinitely.

Minecraft - AND gate with five inputs

XOR Gate

Minecraft - XOR gate

Here is where things get a bit more complex. This device shown above is an XOR gate. It is similar to an OR gate, in that it is an output that can be triggered from multiple different outputs, however it requires that one and only one input is active. If both the blue and yellow were powered, the light would stay off, but if just one is powered, the light will turn on.

This makes use of a triple AND gate, plus an OR gate. In order for the redstone lamp to be active, it must be powered by either the upper left torch or the upper right torch. If the center torch is active, then neither of those two torches can be active, and that center torch is only active if both levers are pressed down. This is because the two levers create an AND gate with that torch as the output.

RS NOR Latch

Minecraft - RS NOR latch

The purpose of an RS NOR latch is to make it so that an output can only be toggled on by one particular input, and off by another. In the image above, the blue input would power the light, and even though it is just a button, not a lever, it will stay on indefinitely. To turn it off, players must press the yellow button. Hitting the blue button a second time will do nothing.

The reason this works is because of something called tick delay. Essentially, it takes one tick for a redstone torch to turn on or off, whereas wire powers instantly. When a player hits the blue button, it triggers the wiring next to it instantly, and after two ticks, the far torch will turn on, powering that same redstone wire but from the other side. When the button unclicks, the blue block will still be receiving power, but from the powered wiring instead. This effectively locks the system.

Pressing the blue button again won't do anything, since the blue block is already being powered. However, hitting the yellow button will cause the same thing to happen as when the blue button was first pressed, unlocking the system and reenabling the blue button.

RS NAND Latch

Minecraft - RS NAND latch

RS NAND latches are useful when players want a system with two components, where both components can not be deactivated at the same time. An example of this might be a double set of doors, where they only want one set of doors to be open at a time, preventing things from escaping. In the picture above, the blue lever will toggle the top light on and off as normal, as will the yellow lever with the bottom light. However, if one lever is toggled, the other becomes locked.

The logic here is rather straightforward. When a lever is pulled, the second Redstone torch away from it gets powered on, which keeps the other circuit powered, regardless of its lever's state. This means that if one lever is pulled, it must be flicked back up before the other one can be used, and vice versa.

T Flip-Flops

Minecraft - two T Flip Flops

The last of the basic logic gates are the T Flip-Flop. In simplest terms, the role of the T Flip-Flop is to create a single-input toggle that doesn't use a lever. When a button is pressed in the picture, the light will stay active until the button is pressed again. This is incredibly useful for things powered by pressure plates, for example. When a player enters a room and steps on it, it can turn on the lights, then when a player triggers it on the way out, it turns them off. This negates the need for a lever.

There are countless designs for T Flip-Flops that can be found online, but the two pictured above are the most common. The left one works because when the button is pressed, both torches turn off, however, the currently active piston will stay extended, because its extended arm is directly beneath the active Redstone wiring. When the button unclicks, there will be one tick where that piston receives no power, because of the torch's tick delay. It will retract, and one tick later, both pistons receive power. Because the piston takes longer than one tick to retract, the other piston will extend instead, flipping the state.

The second design is a bit less complex, but may not be suitable in certain situations, depending on space or resources. It utilizes a downwards-facing dispenser with a water bucket inside. A filled water bucket will output a strength of two, while an empty one will output a strength of one. Every time the button is pressed, it will empty or fill the bucket, provided there is an empty space below it. This means that if the output is after two blocks of wire, this will behave as a T Flip Flop.