Join 2,355+ Players and socialize together

Join the Community Today

Come hang out with us on the Minecraft Addicts Forums — it's the perfect place to chat, trade cool stuff, and connect with awesome builders just like you! Let's plan epic builds, create amazing worlds together, and then show off your masterpieces to everyone! Plus, we’re all about having fun, so feel free to talk about anything under the sun—games, hobbies, favorite snacks, you name it! Can't wait for you to join and share all the Minecraft magic!

Minecraft Logic Gates

Status
Not open for further replies.

Tsar_Maple

Well-known member
Joined
May 24, 2012
Messages
673
Hey everyone! So this semester, one of my Computer Science classes is 1610 Discrete Mathematics, which is logic-based reasoning. This means deducing things using true or false. I recently discovered that the applications of discrete mathematics can be visualized in Minecraft using logic gates, which didn't make any sense to me before I started this course!

Logic uses a few terms such as AND, OR, and XOR. Each term has different properties associated with it.

So, with that said, I'm going to be showing you guys that don't do much redstone what a simple logic gate is, using an OR gate. OR gates are True if one or both inputs are True (turned on). If both inputs are false, the output will be false (turned off).

In discrete mathematics, we use what's called a truth table to visualize this.

[table="width: 500, class: grid, align: center"]
[tr]
[td]A[/td]
[td]True[/td]
[td]True[/td]
[td]False[/td]
[td]False[/td]
[/tr]
[tr]
[td]B[/td]
[td]True[/td]
[td]False[/td]
[td]True[/td]
[td]False[/td]
[/tr]
[tr]
[td]A OR B[/td]
[td]True[/td]
[td]True[/td]
[td]True[/td]
[td]False[/td]
[/tr]
[/table]

(The alignment is usually oriented differently, as you'll see in a bit. Too lazy to make it super pretty, but the table is still correct)

So, I wanted to test this out for myself. I built my truth table...

Truth table:
eLXgovh.png

...and then built a simple proof-of-concept. If the redstone lamp is on, then the output is True. If it's off, the output is False.

True OR True
gIpiriZ.png


True OR False
6bEkOBH.png


False OR True
LUeNhfO.png


False OR False
JumWBN7.png

These concepts are kinda key to many redstone works. AND gates are useful for locking doors (AND requires both inputs to be True, so if you had a door that had a switch on the interior and a pressure plate on the exterior, the switch would need to be On (True) in order for the door to open when the pressure plate is pressed).

I'm still learning a lot about Logic implementations in Minecraft, but if y'all found this interesting, lemme know and I'll post more! Also, if you've got questions, I'll answer those too :P
 
I am glad that you are finally finding redstone interesting. Its good fun trying to make solutions to problems using redstone and look forward to seeing how you apply your new interest! :D
 
Haha yeah! Looking forward to getting in the more complex bits

edit: I think I might make this a series actually haha
 
Last edited:
I remember years ago I made a red stone tutorial building, that was over 6 years ago now. Had all the different circuits in and all the applications that I could think of. Redstone has come a long way since then! Do it, would be a helpful reference for people. If you need help with anything just say :)
 
Status
Not open for further replies.
Back
Top