Building Digital Logic Circuits in Minecraft (2024)

Logic gates and their implications in Minecraft

Building Digital Logic Circuits in Minecraft (3)

Two years ago, when I first learned about the importance of computers and their impact on the future, I immediately wanted to learn about information technology.

However, being a young boy at the time, all the big words I read from online articles dissuaded me from learning more about this topic. Growing up, I liked to play a lot of Minecraft. I still had not given up on computers yet and it was when I came upon the possibility of creating a computer in Minecraft, my interest was piqued again.

The information technology revolution is currently underway, and what a blessing it is to be a part of it. A field where many advancements in computers are still waiting to be discovered.

Moore’s Law is approaching its end and will cease to be effective by 2025, a statement backed by even its creator, Gordon Moore. So what does this mean and how can computers continue to advance? It means that in order to improve, we must co-design hardware and software together for a target application to maximize performance and minimize power consumption. As this generation grows, people are ever so much more reliant on technology which calls for the need to innovate and improve.

Minecraft is a game with unlimited possibilities to express the freedom of your mind, building whatever you desire. One feature of the game that allows for educational growth is Redstone, a sort of “electricity” for Minecraft that can carry a signal like wires in our lights that turn it on. Redstone can be used in the game to create automatic doors but I think it is much cooler that you can make a computer out of it as well.

For the readers who have little background in computers, but have a profound knowledge of Minecraft, the Redstone mechanic allows you to understand a computer by visualizing the computer components in 3D, something I personally really benefited from. This article will teach you all you need to know about logic gates and their implications in Minecraft.

Building Digital Logic Circuits in Minecraft (4)

Like any big problem, start from the bottom and work your way up. To build a computer, one must know how to build logic gates, the fundamental building blocks for every component of a computer. Logic gate input and output signals are binary, meaning they are either of 0’s or 1’s. The logic gates I used are AND, OR, NOT, NAND, and XOR gates.

For the readers that may lack knowledge of Minecraft, I will try my best to highlight all the Minecraft words such as Redstone or levers. Listed below are the functions of basic building blocks in Minecraft that are essential to building the computer. For the readers who already understand how Minecraft redstone works, you may skip to the section Logic Gates, however, I do encourage you to check out the list below as the explanations will relate to the computer.

  • Lever — provides a signal that is either on or off to power the redstone. The lever will be used to power 1 step actions such as just power on one gate or circuit.
  • Redstone — the wiring that is used to bring together contraptions in Minecraft, similar to how wires work in circuits.
  • Repeater — renews the redstone signal. In Minecraft, the redstone signal fades after it travels for fifteen blocks, so the repeater picks up the signal and powers it back up, allowing the signal to travel over 15 blocks where another repeater may be needed.
  • Redstone torch — provides an always-on signal that can connect to redstone. It can only be turned off when a redstone signal inverts it, turning the redstone torch off.
  • Redstone lamps — show the output of a signal. There is no functional purpose of the lamp other than being able to turn on brightly to easily indicate if a gate or circuit is successful.

Listed below are examples of these building blocks in action:

In this picture, the lever is off, so there is no signal going through the redstone, repeater, and the redstone lamp.

Building Digital Logic Circuits in Minecraft (5)

In this picture, however, the lever is on so there is a signal going through the redstone, repeater, and lamp. As you can see, when the lever is on, these parts all glow brightly.

Building Digital Logic Circuits in Minecraft (6)

In this picture, the redstone torch glows brightly indicating it is on. The lever is off so there is no signal going through it, leaving the torch on.

Building Digital Logic Circuits in Minecraft (7)

In this picture, however, the lever is on and the redstone signal is on. The redstone torch does not glow here because a signal is going to it, turning it off. This will be important for building NOT gates later.

Building Digital Logic Circuits in Minecraft (8)

Some other blocks I used to make everything are blue concrete blocks, which I mostly used to build logic gates/circuits and purple concrete blocks to bridge redstone signals which is first used in the Full Adder.

The reason for building a bridge is because in Minecraft, when two redstone signals cross paths or are next to each other, they automatically connect, messing up the signal, so the bridge moves an intersecting signal a few blocks up so they do not interfere with another signal.

It is important to understand what a truth table is to understand the concept of a logic unit. A truth table will only ever have 0 and 1 which is explained below

  • Inputs: When input is 0, it means OFF, which means the lever is off
  • Inputs: When input is 1, it means ON, which means the lever is on
  • Outputs: When output is 0, it means OFF, which means redstone lamp is off
  • Outputs: When output is 1, it means ON, which means the redstone lamp is on

An AND gate has two inputs and when both off, the output is off. When one of the inputs is on but the other is off, the output is still off. When both inputs are on, only will the output be on. It’s called an AND gate because input A and B have to be on for the output to be on.

Building Digital Logic Circuits in Minecraft (9)
Building Digital Logic Circuits in Minecraft (10)
Building Digital Logic Circuits in Minecraft (11)

A NOT gate has one input that inverts a signal. A common alternative name for this is an inverter, since it inverts the signal. When the input is on, the output is off. When the input is off, the output is on. As the name implies, it is called a NOT gate because when input A is off, output is on and vice versa.

Building Digital Logic Circuits in Minecraft (12)
Building Digital Logic Circuits in Minecraft (13)
Building Digital Logic Circuits in Minecraft (14)

An OR gate has two inputs and when both inputs are off, the output is off. When either of the inputs are on and the other is off, the output is on. When both inputs are on, the output remains on. This is called an OR gate because either input A or input B can be on for the output to be on.

Building Digital Logic Circuits in Minecraft (15)
Building Digital Logic Circuits in Minecraft (16)
Building Digital Logic Circuits in Minecraft (17)

A NAND gate has two inputs and works opposite of the AND gate. When both inputs are off, the output is on. When either input is on and the other is off, the output remains off. When both inputs are on, the output will turn off.

Building Digital Logic Circuits in Minecraft (18)
Building Digital Logic Circuits in Minecraft (19)
Building Digital Logic Circuits in Minecraft (20)

A XOR, also known as an exclusive or gate, has two inputs and works similarly to the OR gate. The only difference is when both inputs are on, the output is off.

Building Digital Logic Circuits in Minecraft (21)
Building Digital Logic Circuits in Minecraft (22)
Building Digital Logic Circuits in Minecraft (23)

Now that we know some fundamental logic gates, we can start to build more as we transition to Combinational Circuits. These circuits are constructed with logic gates and is the next level up towards building a computer.

A MUX is a circuit that has a certain number of inputs with a switch that can select which input to read. A 2:1 MUX is constructed by 4 NAND Gates and connected like this below:

Building Digital Logic Circuits in Minecraft (24)
Building Digital Logic Circuits in Minecraft (25)

The switch in the diagram is labeled as A, which will input into the NAND gates of I0 and I1 and select which input will be outputted to the last NAND gate. Essentially, when A is off, or 0, the switch will read the input of I0. But when A is on, the switch will read the input of I1.

Building Digital Logic Circuits in Minecraft (26)

A 4:1 MUX has four data inputs and two selection lines. There are multiple ways to make this but I chose to use an assortment of three 2:1 MUXs.

Building Digital Logic Circuits in Minecraft (27)

In a 2:1 MUX, the A(same as S0 and S1 in this case)switch selects which In input to output to the next 2:1 MUX. When S0 is off, it will select I0 and I2 and when S0 is on, it will select to read inputs from I1 and I3.

To put this into perspective, when S0 is on, that means a signal will go through the first 2 MUX’s if I1 and I3 are on. Think of S0 as the input selector for 2 separate MUX’s so if I0 is on but I3 is off, they will not affect each other in any way.

The outputs of the first 2 MUX’s will feed into the next 2:1 Mux where S1 will select which input to read. If S0 was on, which means I1 and I3 go through, and then if S1 was off, it means that only I1 will go through. If S1 was on, it would mean I3 goes through to output Q.

Building Digital Logic Circuits in Minecraft (28)

A 2:4 decoder is a circuit where 2 binary inputs labeled A and B are decoded into one of 4 outputs. This circuit is made up of two NOT gates and four NAND gates.

Building Digital Logic Circuits in Minecraft (29)
Building Digital Logic Circuits in Minecraft (30)

The inputs A0 and A1 act as 2 bits of inputs, meaning with those two switches, there are four possible inputs that each correspond with one of four possible outputs for D.

Building Digital Logic Circuits in Minecraft (31)

A Half Adder is a circuit that adds together two 1-bit binary inputs, A and B where the output is the Sum(S) and the Carry(C). S is the sum of A and B and the C is the carry digit for a larger digit. A Half Adder is made with an XOR gate and an AND gate.

Building Digital Logic Circuits in Minecraft (32)
Building Digital Logic Circuits in Minecraft (33)

When A and B are off, the values are 0 and 0, so 0 + 0 outputs a Sum of 0 and a Carry of 0. When A is on and B is off, the values are 1 and 0, which mean 1 + 0, for a Sum of 1, and a carry of 0. Now if A and B were 1 and 1, which means on, the addition would be 1 + 1 for an answer of 10, with the Sum being 0 and the Carry being 1. A Half Adder is useful to do single bit math and a helpful step to understand a Full Adder.

Building Digital Logic Circuits in Minecraft (34)

A Full Adder is where circuits become slightly more complicated. The difference between a Half Adder and a Full Adder is that it has three inputs, with one of the inputs being the carry from the previous output. This circuit consists of a Half Adder, an XOR gate, two AND gates, and an OR gate.

Building Digital Logic Circuits in Minecraft (35)
Building Digital Logic Circuits in Minecraft (36)

The dots on the circuit diagram represent a junction/bridge where only the inputs from its respective input can change direction and not interfere with other inputs. I used purple concrete blocks(just to color code, any color will work) to replicate this in Minecraft.

Building Digital Logic Circuits in Minecraft (37)

Everything I have talked about so far is all combinational logic which has no memory. All computers need memory to store data and this is where sequential circuits come in. Sequential logic based has memory elements and must have a clock to function.

A clock runs in a loop and sends a signal that turns on and off in the same intervals. This will be important because like how our hearts keep beating, the clock sends signals to keep the system running on its own.

Building Digital Logic Circuits in Minecraft (38)

I used a “redstone comparator” and then many “redstone repeaters” to slow down the “redstone signal”, a nifty feature along with the power renewal. Without the “repeaters”, the clock runs too quickly for any outputs to be seen.

Building Digital Logic Circuits in Minecraft (39)

As you can see in the picture, when the clock turns on, a signal runs through the circuit which splits off to the output signal. Once that signal has passed through, it turns off which also turns the output signal off until the clock edge comes back around.

To start, a flip flop is a memory element for which the output is equal to the value of the stored state inside the element and for which the internal state is changed only on a clock edge.

Building Digital Logic Circuits in Minecraft (40)

A D flip flop is a circuit with one data input that stores the value of the input signal when the clock edge occurs. The data is stored until the next clock edge comes in. It will read the signal that is sent and pushes out the data from the previous clock. For example, if D is on, and the clock edge occurs, the redstone lamp will glow. After this, even if D is flipped on or off, the redstone lamp will continue to glow until D is turned off and the clock edge occurs.

Building Digital Logic Circuits in Minecraft (41)

Two d flip-flops connected together make a counter which stores 2 bits of binary data. Connecting three d flip flops together can store 3 bits of binary data and so on.

All of these logic circuits are like our legos in the lego box, and have so far been only one-step actions that are powered by the lever. I hope you have learned how to build logic circuits in Minecraft.

In the next article, these gates and circuits will be connected to each other and I will share with you how I built it up into a microprocessor.

Building Digital Logic Circuits in Minecraft (2024)
Top Articles
Latest Posts
Article information

Author: Margart Wisoky

Last Updated:

Views: 6155

Rating: 4.8 / 5 (58 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Margart Wisoky

Birthday: 1993-05-13

Address: 2113 Abernathy Knoll, New Tamerafurt, CT 66893-2169

Phone: +25815234346805

Job: Central Developer

Hobby: Machining, Pottery, Rafting, Cosplaying, Jogging, Taekwondo, Scouting

Introduction: My name is Margart Wisoky, I am a gorgeous, shiny, successful, beautiful, adventurous, excited, pleasant person who loves writing and wants to share my knowledge and understanding with you.