search
Minecraft Wiki

Minecraft Wiki

936 pages 4332 edits Updated: Jul 06
Wiki BG

Logic gates in Minecraft

How to Make Logic Gates in Minecraft


Minecraft’s Redstone behaves very closely to real-life computer engineering. Because of this, it inherits a number of engineering logic gates that are used for processing information. These little logic gates are in your computer right now, taking in inputs and spitting out outputs in the millions in order to display these words. And in Minecraft, we can see them in action on a macroscale and even use them to our advantage.


Because of this analogy with computer engineering, we can treat Redstone signals as 1s and 0s, just like a computer would. For example, a signal that is 1 is on, and a signal that is 0 is off. Of course, signals can hold up to 16 values between all the way on and all the way off in Minecraft but for logic gates all we need to think about is 1 = on and 0 = off. So in this sense, these gates are math. Very strange math but math nonetheless.


NOT Gates


NOT Gates is the simplest of logic gates. Also called an Inverter, the NOT Gate will take an input and output its opposite. So if the input is a 0 or is off, the output will be a 1 or on. If the input is a 1 or on, it will output 0, or off.


INPUTOUTPUT
ON, 1OFF, 0
OFF, 0ON, 1


NOT Gates are the simplest of logic gates. Also called an Inverter, the NOT Gate will take an input and output its opposite


So if the input is a 0 or is off, the output will be a 1 or on. If the input is a 1 or on, it will output 0, or off


An Inverter or NOT Gate is also the easiest to build. Simply place a Redstone Torch on the block that your input is on and you have your Inverter!


OR Gates


An OR Gate is the next simplest. In fact, if you ever tried to figure out how to make these logic gates yourself, you will probably have accidentally made an OR Gate. These gates function by taking two inputs and outputting a 1 if either one or both of the signals is 1. It will only be off if both signals are also off.


INPUT 1INPUT 2OUTPUT
Off, 0Off, 0Off, 0
On, 1Off, 0On, 1
Off, 0On, 1On, 1
On, 1On, 1On, 1


An OR Gate is next simplest. In fact, if you ever tried to figure out how to make these logic gates yourself, you will probably have accidentally made an OR Gate.


These gates function by taking two inputs and outputting a 1 if either one or both of the signals is 1


It will only be off if both signals are also off.


Take you two inputs and feed them into a single block then place a Redstone Repeater or Redstone Comparator facing away from the block which will be the output.


These are a bit more complicated to make but still require little thought. Take you two inputs and feed them into a single block then place a Redstone Repeater or Redstone Comparator facing away from the block which will be the output.


NOR Gates


NOR Gates are the first of the N___ Gates, which effectively are a combination of the first gate and an Inverter. However, in computer engineering, they get their own names so they also do for Minecraft. The NOR Gate will take the same inputs as the OR Gate but only output a signal when both inputs are off. So think of the OR Gates original calculation 0 + 0 = 0. Now you apply the Inverter to the result: 0 = 1. I told you it was strange math.


INPUT 1INPUT 2OUTPUT
Off, 0Off, 0On, 1
On, 1Off, 0Off, 0
Off, 0On, 1Off, 0
On, 1On, 1Off, 0


NOR Gates are the first of the N___ Gates, which effectively are a combination of the first gate and an Inverter.


The NOR Gate will take the same inputs as the OR Gate but only output a signal when both inputs are off. So think of the OR Gates original calculation 0 + 0 = 0


As said before the NOR Gate is a combination of the OR Gate and an Inverter, so simply make your OR Gate and add a Redstone Torch on your block instead to invert the signal.


Now you apply the Inverter to the result: 0 equals 1.


As said before the NOR Gate is a combination of the OR Gate and an Inverter, so simply make your OR Gate and add a Redstone Torch on your block instead to invert the signal.


AND Gates


AND Gates function as the opposite of the OR Gate and are more widely used in simple contraptions since they allow the detection of two separate inputs being on. An AND Gate receives two inputs and will only output a signal of both inputs are on. So now 1 + 1 = 1.


INPUT 1INPUT 2OUTPUT
Off, 0Off, 0Off, 0
On, 1Off, 0Off, 0
Off, 0On, 1Off, 0
On, 1On, 1On, 1


AND Gates function as the opposite of the OR Gate and are more widely used in simple contraptions, since they allow the detection of two separate inputs being on.


An AND Gate receives two inputs and will only output a signal of both inputs are on. So now 1 + 1 = 1


AND Gates are a bit more complicated to make. They take the two inputs into two blocks with Redstone Torches on them that are joined to each other by another piece of Redstone on a block between them.


Finally on the side of that block is one last Redstone Torch which is the output.


AND Gates is a bit more complicated to make. They take the two inputs into two blocks with Redstone Torches on them that are joined to each other by another piece of Redstone on a block between them. Finally on the side of that block is one last Redstone Torch which is the output.


NAND Gates


Just like the NOR Gate, this is the inverted version of the AND Gate. This will only be on if the outputs are either both off or one is off. So now 1 + 1 = 0.


INPUT 1INPUT 2OUTPUT
Off, 0Off, 0On, 1
On, 1Off, 0On, 1
Off, 0On, 1On, 1
On, 1On, 1Off, 0


Just like the NOR Gate, this is the inverted version of the AND Gate.


This will only be on if the outputs are either both off or one is off.


Once you have an AND Gate making this one is easy.


Just remove the last Redstone Torch. It acts as an inverter and will make you your NAND Gate.


Once you have an AND Gate making this one is easy. Just remove the last Redstone Torch. It acts as an inverter and will make you your NAND Gate.


XOR Gates


Now we're getting to the complicated stuff. XOR Gates or Exclusive OR Gates behave similar to OR Gates but remove the output when both inputs are on. So now only one input can be on for it to output a signal. Basically 1 + 0 =1 but now 1 + 1 = 0.


INPUT 1INPUT 2OUTPUT
Off, 0Off, 0Off, 0
On, 1Off, 0On, 1
Off, 0On, 1On, 1
On, 1On, 1Off, 0


XOR Gates or Exclusive OR Gates behave similar to OR Gates but remove the output when both inputs are on.


So now only one input can be on for it to output a signal. Basically 1 plus 0 equals 1 but now 1 plus 1 equals 0


First you need to put two Redstone Torches on your input blocks, one on the top and one on the back. Then connect the top ones together similar to how you did in the AND Gate.


Finally connect these last two torches together with Redstone between them and you have your output for your XOR Gate.


This one is hard to make. First, you need to put two Redstone Torches on your input blocks, one on the top and one on the back. Then connect the top ones together similar to how you did in the AND Gate. Then add another block between the Redstone Torches on the backs of your input blocks with Redstone on top of it and another Redstone Torch on the back of it. You should have a strange torch-covered triangle now. Now the second section begins by placing Redstone on either side of the furthest back torch. These two clouds of dust will climb up into two blocks which each have Redstone Torches on their backs. Finally, connect these last two torches together with Redstone between them and you have your output for your XOR Gate.


XNOR Gates


Once again, the inverted version of the NOR Gate. Now 0 + 0 = 1 and 1 + 1 = 1.


INPUT 1INPUT 2OUTPUT
Off, 0Off, 0On, 1
On, 1Off, 0Off, 0
Off, 0On, 1Off, 0
On, 1On, 1On, 1


Once again, the inverted version of the NOR Gate. Now 0 + 0 = 1 and 1 + 1 = 1.


Like the other inverted variants of the gates, this only requires adding an Inverter to the end of the XOR Gate.


Thankfully not as complicated as the initial gate.


XNOR Gates


Like the other inverted variants of the gates, this only requires adding an Inverter to the end of the XOR Gate. Thankfully not as complicated as the initial gate.


IMPLY Gates


Lastly, IMPLY Gates are strange ones. Not used as much as the other gates but they still have their functions. They take in two inputs and output a signal only if the first input is off, if the second input is on and not the first, or if both inputs are on. This is definitely the most unintuitive gate to look at from afar and so the strange math for it is equally unintuitive, so I won't show it to save on headaches.


INPUT 1INPUT 2OUTPUT
Off, 0Off, 0On, 1
On, 1Off, 0Off, 0
Off, 0On, 1On, 1
On, 1On, 1On, 1


Lastly, IMPLY Gates are strange ones. Not used as much as the other gates but they still have their functions.


They take in two inputs and output a signal only if the first input is off, if the second input is on and not the first, or if both inputs are on.


This is definitely the most unintuitive gate to look at from afar and so the strange math for it is equally unintuitive, so I wont show it to save on headaches.


This can be made by simply connecting a second input to the end of an Inverter gate. A strangely simple build method for such a unintuitive gate.


This can be made by simply connecting a second input to the end of an Inverter gate. A strangely simple build method for such an unintuitive gate.


What Gates are Used For


Well obviously since this is Minecraft these gates are used for practically anything. But realistically they’re going to be used on their own. For example, if you want a door to open by pressing a button on either side of it, you can connect two buttons to an OR Gate or an XOR Gate. And if you want something to happen when two buttons are pressed together to require some teamwork, that can be done with an AND Gate.


These gates can also be strung together to create computers… in Minecraft… on your computer… Yeah. Since these are the exact same gates every computer uses to process information, people have used them to make all sorts of programs, mostly calculators. And considering the components to make these gates have existed since Redstone was introduced, there are plenty of old pictures and videos of ancient versions of Minecraft using these for impressive Redstone feats.


Video Tutorial


youtube-cover


Conclusion


Logic gates are basic and useful when it comes to Minecraft Redstone. They behave just the same as computer logic gates and with them, you can make some impressive contraptions. Or just make simple doors for your base. It’s Minecraft, take these tools and make whatever you can think of!


This functionality is open only to Wiki Admins

Popular In Minecraft Wiki

Comments

Latest Wiki Pages

Smelting

Smelting

Minecraft Wiki 10 mn 24 d
Sky Dimension in Minecraft

Sky Dimension in Minecraft

Minecraft Wiki 10 mn 7 d
Education Edition

Education Edition

Minecraft Wiki 10 mn 11 d
Getting Started in Minecraft

Getting Started in Minecraft

Minecraft Wiki 11 mn 15 d
The Twilight Forest Minecraft mod

The Twilight Forest Minecraft mod

Minecraft Wiki 11 mn
Mowzie’s Mobs

Mowzie’s Mobs

Minecraft Wiki 11 mn
What is Pixelmon in Minecraft?

What is Pixelmon in Minecraft?

Minecraft Wiki 11 mn 2 d
How to Craft an Oak Button in Minecraft

How to Craft an Oak Button in Minecraft

Minecraft Wiki 11 mn 2 d
How to Craft a Tripwire Hook in Minecraft?

How to Craft a Tripwire Hook in Minecraft?

Minecraft Wiki 11 mn 4 d
How to Craft a Lever in Minecraft?

How to Craft a Lever in Minecraft?

Minecraft Wiki 11 mn 5 d
How to craft a Redstone Repeater in Minecraft?

How to craft a Redstone Repeater in Minecraft?

Minecraft Wiki 11 mn 6 d
How to craft a Daylight Detector in Minecraft?

How to craft a Daylight Detector in Minecraft?

Minecraft Wiki 11 mn 7 d
How to Craft a Redstone Comparator in Minecraft

How to Craft a Redstone Comparator in Minecraft

Minecraft Wiki 11 mn 8 d
Can Dragon Fireball be used as a decorative item in Minecraft?

Can Dragon Fireball be used as a decorative item in Minecraft?

Minecraft Wiki 11 mn 9 d
How to Craft a Beacon in Minecraft

How to Craft a Beacon in Minecraft

Minecraft Wiki 11 mn 11 d
What are Elder Guardians and what do they do in Minecraft?

What are Elder Guardians and what do they do in Minecraft?

Minecraft Wiki 12 mn 16 d
Verdant Froglight in Minecraft

Verdant Froglight in Minecraft

Minecraft Wiki 12 mn 18 d
What are Dragon Fireballs in Minecraft?

What are Dragon Fireballs in Minecraft?

Minecraft Wiki 12 mn 19 d
What is Structure Void in Minecraft?

What is Structure Void in Minecraft?

Minecraft Wiki 12 mn 20 d
What are Structure blocks in Minecraft?

What are Structure blocks in Minecraft?

Minecraft Wiki 12 mn 20 d