#  Redstone Computing Fundamentals | Truth Tables and Logic Gates

Thank you to my assistant, odesseygamer12, for helping to create this post! Without him this wouldn’t exist.

Logic gates are probably the first thing you should learn when picking up redstone computing. Logic gates perform “logical” functions and are the backbone of circuits and computing. Truth tables help express the function of a logic gate and are mainly used as a reference, but can also be used for many other things.

Both of these will be covered in this post. Lets start with the most simple logic gate, and work our way up. For all gates, input [A] will be on the left and input [B] will be on the right. When constructing your circuit of choice, you can swap the inputs. Customize logic gates to your need!

NOT Gate

The NOT gate is the most simple of logic gates. It only takes in one input, and the output is the reverse of the input. It’s truth table is shown below.

Input Output
A Q
0 0
1 1

AND Gates:

AND Gate

The AND gate is another simple gate. The output is only on if both inputs are also on.

Input Output
A / B Q
0 / 0 0
0 / 1 0
1 / 0 0
1 / 1 1
NAND Gate

The NAND gate is the reverse of the previous AND gate. The output is always on unless both inputs are on, then it is off.

Input Output
A / B Q
0 / 0 1
0 / 1 1
1 / 0 1
1 / 1 0

OR Gates:

OR Gate

The OR gate is another simple gate. The output is only off if both inputs are on.

Input Output
A / B Q
0 / 0 0
0 / 1 1
1 / 0 1
1 / 1 1
NOR Gate

The NOR gate is the opposite of the OR gate. The output is only on if both inputs are off.

Input Output
A / B Q
0 / 0 1
0 / 1 0
1 / 0 0
1 / 1 0

XOR Gates:

XOR Gate

The XOR gate is the gateway into more complicated gates. The XOR gate is only on if only one input is on. Otherwise, it is off.

Input Output
A / B Q
0 / 0 0
0 / 1 1
1 / 0 1
1 / 1 0
XNOR Gate

The XNOR gate is the opposite of the XOR gate. The XNOR gate is only on if both inputs are the same.

Input Output
A / B Q
0 / 0 1
0 / 1 0
1 / 0 0
1 / 1 1

IMPLY Gates:

IMPLY Gate

IMPLY gates are less known, but also slightly confusing. When reading the truth table and practicing with IMPLY gates, they become easy to learn. There are two different IMPLY gates, referred to as:
A IMPLY B, or B IMPLY A.

IMPLY gates are only off if their first variable (such as A IMPLY or B IMPLY) is on, with the second variable (IMPLY B, or IMPLY A) is off.

A IMPLY B Gate:

Input Output
A / B Q
0 / 0 1
0 / 1 1
1 / 0 0
1 / 1 1

B IMPLY A Gate:

Input Output
A / B Q
0 / 0 1
0 / 1 0
1 / 0 1
1 / 1 1
NIMPLY Gate

NIMPLY gates are the opposite of IMPLY gates. NIMPLY gates are only on if the first variable (NIMPLY A or NIMPLY B) is on, and the second variable is off.

A NIMPLY B Gate:

Input Output
A / B Q
0 / 0 0
0 / 1 0
1 / 0 1
1 / 1 0

B NIMPLY A Gate:

Input Output
A / B Q
0 / 0 0
0 / 1 1
1 / 0 0
1 / 1 0

Thank you for reading this post! This is the first in a series I will make. These posts take time from researching and writing, so please bear with me if I do not make a sequel in roughly 200,000 years. Have a nice day!

2 Likes

This is really helpful for beginners!

2 Likes