A CPU built in Minecraft

Minecraft is nothing less than a phenomenon. Originally developed by Swedish programmer Markus “Notch” Persson and his company Mojang, the blocky, open-world game in which you can build your own world out of various types of blocks was very recently bought by Microsoft for $2.5 billion, making Markus an overnight billionaire and allowing him to pay $70 million cash for the most expensive house in Beverly Hills, which was in the process of being bid on by several celebrities.

The house that Minecraft bought

The house that Minecraft bought

Microsoft sees the value in Minecraft considering its huge success, and uses it extensively in HoloLens demonstrations.

If you’re not familiar with the amazing stuff that can be created in Minecraft, people will compare it to Lego in that you build things out of virtual blocks, however the description isn’t apt, as that’s where the similarities end. The blocks in Minecraft can be functional, performing a task, and allowing mechanical or even electrical devices that are more difficult to do with a physical set. To give an idea of the scope, here’s a video showing some incredible creations, and another showing an insane Beetlejuice-themed rollercoaster that takes you through the plot of the movie.

All that remarkable stuff aside, this is a tech class, and so what I really want to show you all is an actual, working 16-bit CPU someone constructed entirely inside of Minecraft. If uses a form of Assembly language in order to carry out very basic  instructions such as “load a number then add another number to it,” but it is functional. There is a forum on how to program it at this link, however I will paste the op-codes from that thread here then give a basic example of how it might work, based on example given in the thread:

0 NOT (NOT)
1 – memory (SUBm)
2 + memory (ADDm)
3 OR memory (ORm)
4 WRITE memory (STOREm)
5 BRANCH if Accumulator = 0 (BEQ)
6 AND memory (ANDm)
7 LOAD memory (LOADm)
8 —UNUSED—
9 – constant (SUBi)
10 + constant (ADDi)
11 OR constant (ORi)
12 WRITE out (OUT)
13 BRANCH unconditionally (BRA)
14 AND constant (ANDi)
15 LOAD constant (LOADi)

So in other words, let’s say you wanted to add 50 to 30 for a total of 80. You would enter the op-code 15 (Load) then the value you wish to start with (30), then the op-code 10 (add) then the value you wanted to add (50), then write the value to the output, op-code 12. In other words, 30+50=80. Each code and value is a byte.

This is done through a series of switches in the Minecraft world, and it might all sound confusing, but to not clear it up in any meaningful way, here is a video showing the whole thing.