Practice of the book The Elements of Computing Systems: Building a Modern Computer from First Principles
This repository contains my solutions and experiments for the NAND2Tetris course, a comprehensive program that teaches how to build a computer from the ground up.
- Access to the NAND2Tetris Software Suite.
- Understanding of digital logic and basic computer architecture.
The repository is structured according to the course's projects:
This repository is organized based on the chapters of the NAND2Tetris book, with each project corresponding to a specific chapter.
Note: Inside the folder
practice/chips
are add-on chips made for practice, but those are not related to the standard course.
- Folder:
materials/projects/01/
- Description: Implementation of basic logic gates (AND, OR, NOT, etc.)
- Contents:
- Logic gate HDL files
- Test scripts and comparison files
- Folder:
materials/projects/02/
- Description: Construction of arithmetic circuits like Half Adder, Full Adder, and ALU
- Contents:
- Arithmetic circuit HDL files
- Test scripts and comparison files
- Folder:
materials/projects/03/
- Description: Building basic sequential circuits such as DFF, Registers, and Counters
- Contents:
- Sequential circuit HDL files
- Test scripts and comparison files
- Folder:
materials/projects/04/
- Description: Writing machine language programs and scripts
- Contents:
- Machine language programs
- Test scripts and comparison files
- Folder:
materials/projects/05/
- Description: Implementation of the Hack CPU and Memory
- Contents:
- Hack CPU and Memory HDL files
- Test scripts and comparison files
Each folder includes the necessary .hdl
files and other relevant resources.
To use a project's files:
- Open the NAND2Tetris software.
- Load the
.hdl
file from the project folder. - Execute the corresponding test script provided by the NAND2Tetris course materials.
To execute the Hardware simulator
make hardware
To execute the CPU simulator
make software
This project is open source under the MIT License.