Build your first Full Adder (in Minecraft)

Published: September 21, 2025 | Tags: #computer architecture #verilog

How does your computer do math? After all, we tell our machines to calculate everything, from our taxes to the physics of games like Minecraft, but, what some don’t realize is that everything is fundamentally manipulating ones and zeros.

This specific operation can be done with a really simple circuit, so simple that you will find no trouble understanding it. Let’s talk about the adder

An adder is like a braincell (or part of it), of a computer’s arithmetic logic unit (ALU). It’s essentially what performs the additions.

In this article we are going to study the adder from different angles: the pure theory, the blueprint, the hardware designer’s code, and the representation in Minecraft!

Electrical cat-engineer


First, some theory: How do we even add in Binary?

Some of you might not be technical people. It is okay, what we are going to explain is not complex at all. Imagine binary is a system made of {0, 1}. Think of decimal as a system made of {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Difference? The number of elements.

What about the binary addition? Same as normal addition, but you only have two digits (and you carry over when the sum is 2 or more).

  • 0 + 0 = 0, nothing new.
  • 0 + 1 = 1, normal.
  • 1 + 0 = 1, same.
  • 1 + 1 = 0, with a carry of 1 (be careful, here it changes).

A circuit able to do this is called a half adder. It takes two bits as input and produces a Sum and Carry (two outputs).

Now, what about multi-digit binary numbers? For example 11 + 01: with our current design we would get 11 + 01 = 10 and the 1 for carry. But there’s something weird, the numbers don’t add up. That’s because we need another input. This third input is known as “carry-in”, which is connected to the output of the previous adder!

With this new concept we produce a full adder, which is pretty much two half adders and an OR gate. A full adder would take three inputs and produce two outputs.

This is easier to understand with some diagrams, so let’s go to the next section!


The Logic Gate Diagram

In digital electronics we build circuits like this one with logic gates. A 1-bit full adder can simply be constructed out of some XOR gates, AND gates and an OR gate.

I assume most of you already know what these gates are. But just in case:

  • OR gate: if there are two inputs, at least one has to be one for the output to be one.
A B Output
0 0 0
0 1 1
1 0 1
1 1 1
  • AND gate: if there are two inputs, both have to be one for the output to be one.
A B Output
0 0 0
0 1 0
1 0 0
1 1 1
  • XOR (Exclusive OR) gate: if there are two inputs, one and ONLY one has to be one for the output to be one.
A B Output
0 0 0
0 1 1
1 0 1
1 1 0

Now, time to see the diagram!

Full Adder Diagram

We can see how the inputs (A, B, Cin) go through the gates to produce the correct Sum and Carry-out (Cout) for all the combinations. Don’t you believe me? Try making a truth table!


The Circuit in Verilog

But how does a hardware engineer even describe this? They surely use a Hardware Description Language (aka HDL) like Verilog or VHDL. Let’s say that this is not like C, we literally have to describe the physical connections of the gates.

In Verilog a full adder would look like this.

module full_adder(
  input a,
  input b,
  input cin,
  output sum,
  output cout
);

  assign sum = a ^ b ^ cin;
  assign cout = (a & b) | (b & cin) | (a & cin);

endmodule

Note: ^ is for XOR, & for AND, | for OR.

As you can see, it is not that complicated and it is pretty much a direct translation of the logic in the diagram.


Minecraft Time!

Yes, we can build this in Minecraft, and it’s easy. If you have ever played Minecraft, you must know what “redstone” is.

I will be honest, at first I didn’t understand much about it, but because I didn’t see it through the correct lense. After studying digital electronics, now it just makes sense.

I will not talk about how each specific block works, but here you have a view of the functional full adder.

Minecraft Full Adder

Here you have some configurations. You can build this and test all of them yourself!

View 1

View 2

View 3

Conclusion

We have pretty much explored full adders in different practical (and fun) approaches. This might seem really simple but it’s exactly how computer engineering works: building complex systems from very simple and understandable blocks.

By chaining these we could add 8-bit, 16-bit or 64-bit numbers. We are on our way to building the core of the CPU.

I hope this was useful, and try to learn a HDL, or redstone, from time to time.