This Week In Gaming, I made a 2-bit adder in Minecraft! This was a pretty complex task, as I’m not much of an electrical engineer. That being said, however, I had an absolute blast with this. If you’d like to learn about binary numbers and logic gates.

First, let’s start with numbers. We count every day in base 10, or decimal. This means that each digit in a number can have 10 possible values, 0 through 9. As we move from the rightmost digit to the leftmost digit, the value of each digit is multiplied by 10. The rightmost digit is the one's column, the next to the left is the tens column, then the hundreds column, and so on.

In the same sense, base 2, or binary, is a counting system where each digit has 2 possible values, 0 or 1. As we move from the rightmost digit to the leftmost digit, the value of each digit is multiplied by 2. The rightmost digit is the one column, the next to the left is the twos column, then the fours column, and so on.

For example, 11 in decimal means “eleven”, but 11 in binary means “three”. The decimal number 11 has a 1 in the tens column and a 1 in the ones column, so the answer is ten plus one, eleven. The binary number 11 has a 1 in the threes column and a 1 in the ones column, so the answer is two plus one, three.

Now that we understand binary numbers, let’s discuss Boolean variables and logic gates. A Boolean variable is just a variable that says true or false. A logic gate is a machine that takes two Boolean inputs, say x and y, perform some operation, and then outputs one Boolean value. An AND gate only outputs true if x AND y are true. Similarly, an OR gate outputs true if one of x OR y is true (or both). In contrast, an XOR gate outputs true only if one of x or y is true, but outputs false if both x and y are true.

Now onto Minecraft. A 2-bit adder adds two binary numbers, each of which ranges from 0 to 3. Thus, the output can range from 0 to 6. I constructed this over the course of about an hour. The adder is composed of 3 AND gates, 3 XOR gates, and 1 OR gate. The actual schematic was found in Lab 2 from one of Carnegie Mellon University’s electrical engineering courses. I began by constructing my own AND, OR, and XOR gates in Minecraft using Redstone, Redstone torches, and repeaters. Next, I constructed a “half-adder”, which is about half of the full construction. Then, I constructed a “full adder”, the other half of the machine. Finally, I joined the two together by bridging the Redstone and splitting the signal into two directions where necessary, and I was done! The last real step was switching a couple of the output lines around, such that the binary number was more readable from the side where I inputted the numbers. Overall, this was a very fun, albeit extremely nerdy, project. If you play Minecraft and love Redstone, I highly recommend giving this a go!

## Comentarios