- my implementation of the projects
- introduction to the course and each project (all pictures below are from course slides)
Build a Modern Computer from First Principles: Nand to Tetris Part I
Build a Modern Computer from First Principles: Nand to Tetris Part II
In this project-centered course you will build a modern computer system, from the ground up.
In part I we’ll divide this fascinating journey into six hands-on projects that will take you from constructing elementary logic gates all the way through creating a fully functioning general purpose computer. In the process, you will learn - in the most direct and constructive way - how computers work, and how they are designed.
In part II you will build a modern software hierarchy, designed to enable the translation and execution of object-based, high-level languages on a bare-bone computer hardware platform. In particular, you will implement a virtual machine and a compiler for a simple, Java-like programming language, and you will develop a basic operating system that closes gaps between the high-level language and the underlying hardware platform. In the process, you will gain a deep, hands-on understanding of numerous topics in applied computer science, e.g. stack processing, parsing, code generation, and classical algorithms and data structures for memory management, vector graphics, input-output handling, and various other topics that lie at the very core of every modern computer system.
demo.mov
- use HDL (Hardware Discription Language) to implement a set of elementary logic gates like And, Or, Mux, etc.
- as well as their bit-wise versions And16, Or16, Mux16, etc.
- all gates are builded upon built-in NAND gate
-
build a set of chips like HalfAdder, FullAdder, Add16, Inc16
-
construct an ALU (Arithmetic-Logic Unit) chip using builed chips
-
build chips which can store bits persistently over time, including PC, Register, RAM8, RAM16, etc.
-
build a RAM (Random Access Memory) unit using builded chips
-
write programs using low-level assembly language which is designed upon Hack instruction set
-
(Assembly programming can be highly rewarding, allowing direct and complete control of the underlying machine.)
-
construct the Hack CPU (Central Processing Unit)
-
construct the Hack hardware platform - memory chip
-
put all chips together to yield the top-most Computer chip
-
write an Assembler program which can translate symbolic Hack assembly code into binary machine code which can execute on the Hack hardware platform
-
build a basic VM translator, focusing on the implementation of the VM language's stack arithmetic and memory access commands.
-
extend the basic VM translator into a full-scale VM translator
-
implement the VM language's branching and function calling commands