Hacker News new | past | comments | ask | show | jobs | submit login

I've looked at this sort of stuff as utter voodoo for a long time. Then I ran into this book[1], and everything just kind of 'clicked' into place in my head. I can't recommend this book often enough.

[1]: http://www.nand2tetris.org/book.php

In short: It gives you a hands-on approach in designing and building your own computer and programming language, to end up writing and running your own games on the system.

    * It starts with simple boolean algebra to explain and create logic gates (NAND, AND, OR, XOR, etc).
    * Use these to build an ALU, memory banks and eventually a full CPU.
    * Design an assembly language and assembler for this system.
    * Use the assembler to create a higher level OOP language, compiler and code base.
    * Use this language to write a rudimentary operating system.
    * Write a game to run on the OS.
All using very clear and simple English and a very comprehensive emulation system (written in Java) by the authors.

Edit: For some reason, this site has started showing malware warnings in chrome and firefox since today. Even though Google's advisory[1] makes no mention of any actual malware being detected. I've visited this site safely for a long time. Still, if you don't trust it, then wait until Google clears up the issue. I've already contacted one of the authors about it.

[1]: http://safebrowsing.clients.google.com/safebrowsing/diagnost...




Firefox indicates that nand2tetris.org has been reported as an attack page. Has the site been compromised? Anybody know how to contact the author?

Edit: just noticed the original Edit mentioning that you contacted one of the authors.


Same with Chrome. Beware this link.


Incidentally, a computer engineering curriculum starts a few levels below that, with the physics of the transistors and how circuits actually work.


Brilliant! I just bought this based on your recommendation.


Likewise. Awesome comment. Book I wasn't aware of. Thanks so much for taking the time to write this.


The Book, TECS [The Elements of Computing Systems] is great, but the version I have was missing a lot of stuff. There were certain parts of the hardware design that were missing or not really completeable with what was provided, and not a lot of follow-up resources.

The original guy who built a CPU in minecraft actually built it based on some of the exercises in that book. Good stuff overall.


Might be a good candidate to port to asm.js or even just javascript, there are platforms without Java where this could be a valuable teaching tool.


Not a real port, but I made an HDL as a Python DSL and coded most of the hardware exercises with it. The majority of the work went into emulating their test script interpreter.

Regular Javascript should be plenty fast except for full system simulation with no custom component simulators.

https://github.com/darius/logsim


Or, better yet, just port the Java runtime to Javascript...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: