16 bit ALU in minecraft

yo dog, we heard you liked simulations

We love games here but we don’t often get a reason to write about them. This, however, is worth mentioning. The indie hit Minecraft is eating the entire internet right now. The game itself is hit and miss amongst our staff, but this project is unanimously accepted as awesome. [Theinternetftw} has created a simulation of the ALU section of a 16bit processor.  He can set it in motion and run around watching as the states change. This is part of an even bigger project to create the entire processor as shown in the book “The Elements of Computer Systems“.

For those that are wondering how long it took him to place all of those pieces, he actually imported most of it from another program. You can get more details on how they pulled this off in this forum thread. Be sure to catch the video after the break.

33 thoughts on “16 bit ALU in minecraft

  1. Words cannot describe my respect for this man and his project… how may I serve you my master?

    No seriously, all jokes aside this is amazing. I love you.

  2. Minecraft seems to be a mecca for sperglords of all types.

    You hear about the guy who’s building a to-scale replica of the USS Enterprise?

  3. Interesting as purely by coincidence I happen to also be debugging an ALU coded in an obscure language today. I think he needs to implement a carry look-ahead before going much further.

  4. I’ve designed some ALUs in Computational Logic, but doing it in a 3D environment is awesome (and much more difficult for the lack of encapsulation). If he ends up implementing registers it’ll be completely amazing.

  5. Yeesh… verilog and race conditions is bad enough. I can only imagine the eventual headaches timing might induce designing a “physical” processor. Awesome work.

  6. Simply awesome! He really needs carry look ahead to fasten adding things up (especially if ALU doesn’t have a multiplier) but that is easier said than being done.

  7. @chrelad

    An ALU, or Arithmetic Logic Unit, is the part of a processor that handles the math functions of a program. Normally they handle bitwise operations, add, subtract, multiply, divide, etc. but in this case he made a simplified ALU that only does addition or bitwise AND (&) of two 16-bit operands. Basically what happens in a CPU for a math instruction is the CPU decodes the instruction and passes it on to the ALU, and the ALU does the actual math calculation while the CPU is free to continue running the instruction pipeline. In this case he built the ALU first, and now he wants to implement the rest of a simple CPU, including a program counter, instruction fetch/decode, memory read/write, etc. etc. It’s a very ambitious project.

    And to everyone else, if you haven’t played Minecraft yet you owe it to yourself to check it out. It is one of the most addicting and fun games I have ever played, and it is quickly rising as one of my all-time favorite games. It’s absolutely HEAVEN for us DIY/hacker people that like to come up with crazy ideas and build them. It’s a giant sandbox world that you can do whatever you want it.

  8. Barry Kripke from Big Bang Theory!
    I like that he included the random pigs and bison that must be the cause of havoc within most pooters.

  9. I see a instruction decoder with memory in his future. He can then execute some code. Perhaps a compiler?

    How about rewriting minecraft in minecraft?

  10. One potential problem for stuff like this is that Minecraft only stores so much of the map in memory at once, so things can’t be infinitely huge. And lag between components, of course.

    @IceBrain, I know I’ve seen a video of a memory array by someone else, didn’t save the link though.

  11. OK, this is seriously sick. Extremely cool project, one of the best projects I’ve seen here ever. It takes vast amounts of time to implement a 16-bit ALU in Minecraft, that’s for sure.

  12. I guess i didn’t give minecraft enough of a look, I didn’t realize the game was capable of stuff like this. Time to look again.

  13. @AtkinsSJ

    I wonder if that (size limitation) will kill off implementing a processor + simple memory array. Appropriate pipelining and clocking should put order back into the system. I’m thinking having knowledge of high speed layout + VLSI (making sure wires in a parallel bus are all the same length, general routing practices) skills would be beneficial in pulling off a full scale processor.

    Since minecraft is a 3d realm, you probably could explore the realm of 3d routing of stacked layers. That’d be a nightmare to design, build, and debug. It’d probably be easiest to create HDL for the complete system, simulate it, create RTL, and hand route it, then back to simulation of HDL and minecraft to see where things go awry.

  14. @cornelius785 It looks like the design is heavily software-assisted, with the actual Minecraft map being generated. An HDL->Minecraft toolchain would be both pointless and awesome :D

    I’ll bet the Minecraft developer put in the redstone stuff after reading about people’s work on a Dwarf Fortress floodgate+pressure sensitive plate logic. Toady’s got competition now!

  15. @AtkinsSJ
    Well he could easily build up and down the way as well. It won’t be as pretty anymore, but it can be done.

    I remember some of the crazy huge computers in Dwarf Fortress, spanning huge numbers of floors in order to work.

    As for Red Stone in Minecraft, i would love if Notch eventually added electricity to the game.
    He’d also need to add generators in, as well as the ability to make things like turbines or windmills.
    With power sources, it would make it so much more interesting to work with.
    And then you would be able to build a powered city with lights!
    Whenever the weather cycle is eventually implemented, rain cycles could form and get rid of the whole “infinite” water.
    So much promise for this game.

  16. If any of the admiring commenters here have NOT read The Diamond Age, by Neil Stephenson, you should you must please go read it now. This guy is doing what Stephenson does in his story – creates ingenious and unexpected ways of understanding the principles behind computing. ^_^

    1. @Christine,
      I concur. Also read “mother earth, mother board” and “In the beginning there was the command line” the same author. He’s fantastic at breaking down these systems and relationships in a manner that is both comprehend-able and gripping.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s