To understand logic gates you first have to understand truth tables.

What are truth tables??

Truth tables are a table that shows all possible inputs and outputs of a logic gate or a circuit. For instance the truth table for a not gate looks like

As you can see 0=1 and 1=0 this will lead me on nicely to our first and most simple logic gate the not gate.

Now as you saw from the truth table the not gate inverts the input it can be done simply in minecraft with a block, lever and redstone torch.

That concludes for the not gate but what about or, and and xor???

Well first i will ‘introduce them’ to you by showing you the truth tables for them!

Lets focus on one of them. The OR gate.

What does an OR gate do?

You might have already noticed from the truth tables but the OR gate is on when either of them is on and is only off when both inputs are 0.

This is also very simple in minecraft.

This is just a basic example of what it can look like it has many different designs.

So moving on to the AND gate.

This is a bit more complex than the OR and NOT gates.

When both inputs are on the output is true as you might have seen from the truth table for it. The output is only on if both inputs are on so to say.

This is what one can look like.

Moving on to the most complex logic gate XOR(exclusive or)

Just as the name implies it is an or gate that only accepts 1 input at a time as you can see from the truth table for it the output is only on if 1 of the inputs is on if both inputs are on the output is off. An easy way to think about this is a or gate that will only accept 1 input at a time and if both inputs are on it overloads and turns of.

Hopefully that explained it well but here is what it looks like.

If you would like more examples and more information on logic gates I highly recommend this video!!

I hope this was helpful if you don’t understand something feel free to reply