Build a Modern Computer from First Principles: From Nand to Tetris
Introduction
The course taught by Shimon Schocken and Noam Nisan, professors of CS at the Hebrew University of Jerusalem, aims to build a functional computer from basic components (NAND, decoder, multiplexer) to systems (operating systems, compiler) at a relatively complicated level. They published a book that is also well-known in mainland China called 'The Elements of Computer Systems: Building a Modern Computer from First Principles'. The course is divided into two parts, the first part of which mainly focuses on the implementation of computer hardware, while the second part completes the picture by building software hierarchy based on the first course.
![](https://img.haomeiwen.com/i3810750/47232a4b3022cb20.png)
![](https://img.haomeiwen.com/i3810750/0ca790f67d26db4b.png)
- Part 1: Hack Computer Projects
- Project 1: Boolean Logic
- Project 2: Boolean Arithmetic
- Project 3: Sequential Logic
- Project 4: Machine Language
- Project 5: Computer Architecture
- Project 6: Assembler
Unit 0.1 The Road Ahead
There are many computer science 101 (basic) courses that introduce programming to students; however, many of them fail to interpret the underlying principles behind the scene. For example, we all know the simplest code as follows.
// First example in Programming 101:
class Main {
function void main() {
do Output.printString("Hello World");
do Output.println(); // New line.
return;
}
}
The problem is most of us merely know What the result is, but do not actually understand Why it should be. In a computer, these symbols stored by ASCII code can do nothing without practical abstraction and implementation. Also, if we decide to print something like hello world
, we have to control pixels on a screen to be lighter or darker.
It is essential to study these abstraction levels from the very beginning hardware components to complex software systems. Perhaps, modularity and abstraction are the most beautiful parts in computer science. Once an abstraction layer is successfully built, we can move to the next stage and almost forget the previous layer. In this course, we can perceive this beauty by building a modern computer layer by layer, and the only building blocks we have are just NAND gates.
Unit 0.2: From Nand to Hack
![](https://img.haomeiwen.com/i3810750/f9c9817e7637c65c.png)
We start the journey from the NAND gate and finally execute programs like Space Invaders and Tetris on our computer built by this basic component. All of the components are built in a hardware simulator offered by this course and they also provide several test scripts for us to debug. We need to learn an HDL (hardware description language) program to build our chips in the simulator.
-
Levels
- Electrical engineering, solid state physics
- NAND
- Elementary logic gates (Using Combinational logic)
- CPU, RAM, Chip (Using Combinational and Sequential logic)
- HACK Computer (Using Digital Design)
-
Syllabus
Unit 0.3: From Hack to Tetris
-
Syllabus
- Build a high-level language: JACK
- Build a compiler for JACK
- Build a standard library and a mini-operating system
Unit 0.4: Project 0 Overview
nand2tetris
Download the Nand2Tetris Software Suite
![](https://img.haomeiwen.com/i3810750/0dde38bdffd0f179.png)
![](https://img.haomeiwen.com/i3810750/3637a05637eabb21.png)
网友评论