Shimon Schocken gave a really interesting Google Tech Talk titled From Nand to Tetris in 12 Steps. In the video, he describes a course where students design a complete virtualized computer system from scratch, building from the humble nand gate, to a functional cpu and memory architecture, to compiler software and an operating system, all culminating in a simple game that runs on the virtual hardware.

The hardware projects are done in a simple hardware description language and a hardware simulator supplied by us. The software projects (assembler, VM, and a compiler for a simple object-based language) can be done in any language, using the APIs and test programs supplied by us. We also build a mini-OS. The result is a GameBoy-like computer, simulated on the student’s PC. We start the course (and this talk) by demonstrating some video games running on this computer, e.g. Tetris and Pong.

Building a working computer from Nand gates alone is a thrilling intellectual exercise. It demonstrates the supreme power of recursive ascent, and teaches the students that building computer systems is — more than anything else — a triumph of human reasoning.

It looks like most of the course materials are available online. The necessary hardware emulator and simulator software is open source and available from Shimon’s website.

CS101 Digital Systems Construction
Video – Building a Modern Computer from First Principles [via Slash7]