The Hack Project

Shimon Schocken, Interdisciplinary Center

The talk describes a new course in which our students construct a complete computer system, called Hack, in one semester. Following a review of key topics in Boolean algebra and gate logic, we design some thirty combinational and sequential chips, which set the stage for the construction of Hack's ALU, CPU, and memory systems. The hardware is built using a simple Hardware Description Language and a hardware simulator, developed for this course. We then test the entire machine by running some programs on it, written in Hack's assembly and machine languages. The students write the necessary assembler.

Next, we specify a virtual machine, and the students write an interpreter that translates VM code into Hack's machine language. We then introduce a Java-like language, called Jack, and the students write a compiler from Jack to the VM. This completes the design of the computer. Using Jack, the students write a simple operating system for the computer, and some applications (computer games seem to be most popular). The resulting machine is quite similar to a GameBoy or a Palm computer.

Our objective in this course is to present key hardware and software abstractions and make them concrete through guided implementations, building a complete computer system in the process. We are able to squeeze all this material into one semester since we deal with neither efficiency nor advanced features, leaving these subjects to other courses in the CS program.

We feel that our approach and materials can support a cool "CS2" course, in which "science" elements of the CS field are covered in a hands-on fashion after the students have taken a pre-requisite "CS1" course in programming. For more information go to

Joint work with Noam Nisan.