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.

[youtube=http://www.youtube.com/watch?v=LGkkyKZVzug]

34 thoughts on “16 Bit ALU In Minecraft

  1. 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.

  2. @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.

  3. 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.

  4. 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.

  5. @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.

  6. @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!

  7. @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.

  8. 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 to chreladCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.