Technology

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]

6 thoughts on “From Nand to Tetris in 12 Steps

  1. Oh no. And thanks to a lack of sensible, adjustable current limiting such a thing can kill your circuits faster than you can say PSU. And no, the PSU’s build-in limit at $BIGNUMBE Amps, or an additional fuse don’t count.

    A good lab PSU needs to have an adjustable current limit that should be adjusted to the expected current of the circuit (plus a little bit more). If there is something wrong when powering up the circuit the current limiter can safe your electronics, your breadboard, and your wiring. Or when you short something while poking around with your multimeter or oscilloscope. While, on the other hand, your ATX PSU will happily oblige and drive 10A, 20A or more through your circuit, until something gives in. Hint, it is usually not the PSU giving in.

    20 or more Amps are even enough to let small wires glow and burn. Even lab cables are usually rated at 16A. So say hello to your little fire hazard on your bench, the destroyer of your expensive electronics and equipment.

  2. Yeah. What HE said. Rig up a LM317 as a current limiter if you need it, but for me, a good linear power supply isn’t all that hard to cobble together. It will also be much more useful in the long run and not have any of the HF nasties that plague cheap chiwanese switching supplies.

  3. so is a power supply sufficient for an automobile cd player? they usually run a 10~25 amp, 11.5~14.5v line. i would hate to fry that.

Comments are closed.

Tagged