The nand2tetris project is an educational initiative that guides participants through the process of building a complete computer system, starting from basic NAND gates and progressing to the development of a high-level programming language.
The project is divided into two main section: Hardware Construction and Software Development.
-
Elementary Logic Gates: Implementation of elementary logic gates (AND, OR, NOT) using the NAND gate as the only primitive logic element.
-
Arithmetic Logic Unit (ALU): Design and implementation of an Arithmetic Logic Unit, a fundamental component for performing arithmetic and logic operations.
-
Registers and Memory: Construction of registers and memory components, leading to the creation of RAM units.
-
CPU Design: Development of the Central Processing Unit (CPU) by combining the ALU, registers, and control logic. The CPU is capable of executing simple instructions.
-
Machine Language: Introduction of an assembly-like machine language, with the creation of a simple machine language program to test the CPU.
-
Assembler: Design of an assembler that translates symbolic assembly language code into machine language instructions for the computer built in the Hardware Construction phase.
-
Virtual Machine (VM): Introduction of a stack-based virtual machine and development of a VM translator to convert programs written in a higher-level VM language into the machine language.
-
High-Level Language: Design and implementation of a high-level programming language called Jack. Development of a compiler to translate Jack programs into VM code.
-
Operating System: Construction of a simple operating system providing basic services to programs running on the computer.
For the Hardware Construction part you just have to use the tools (such as HardwareSimulator, CPUEmulator,...) provided by the project authors (tools folder) to interact with the components required at each step.
For what concerns the Software Development section there are always tool provided by the team but all the source code resides in the code folder and all the software for this project is written in Go.
# To test some of your gates against the provided test suite
./tools HardwareSimulator ./Projects/01 - Logic Gates/01 - Not/Not.cmp
# To run some of the software written in the second section
cd code; go run cmd/hack_assembler/main.go \
./Projects/06 - Assembler/01 - Add/Add.asm \
./Projects/06 - Assembler/01 - Add/Add.hack \- @its-hmny - Follow me on Twitter as well
- nand2tetris project
- nand2tetris team
This project is distributed under the GPLv3 license.
