This repository contains my implementation of the projects from the "NAND2Tetris" course, where we build a modern 16-bit computer system from the ground up, starting with basic NAND gates and working our way up to high-level applications.
The repository is organized into individual project folders, each focusing on a specific layer of the computer system:
- Project 1: Boolean Logic
- Implementation of basic logic gates using NAND
- Gates include Not, And, Or, Xor, Multiplexer, and Demultiplexer
- Project 2: Boolean Arithmetic
- Implementation of arithmetic chips
- Half-Adder, Full-Adder, ALU, and more
- Project 3: Sequential Logic
- Implementation of memory elements
- Flip-Flops, Registers, RAM units, and Program Counter
- Project 4: Machine Language Programming
- Writing low-level assembly programs
- Understanding the Hack machine language
- Project 5: Computer Architecture
- Implementation of the Hack CPU and complete computer system
- Integration of CPU, Memory, and I/O
- Project 6: Assembler
- Translates assembly language into binary code
- Written in Python
- Project 7-8: VM Translator
- Two-tier compilation implementation
- Translates VM code into assembly
- Handles stack arithmetic and memory access
- Project 9: High-Level Programming
- Application development in Jack language
- Project 10-11: Compiler
- Jack language compiler development
- Syntax analysis and code generation
- Project 12: Operating System
- Implementation of basic OS services
- Math, Memory, Screen, Keyboard handling
- Hardware Description Language (HDL) for hardware simulation
- Python for software components such as the VM transalator and compiler
- Jack programming language for high-level applications
To test the files, go to the NAND2Tetris IDE, and choose the appropriate project. When you run the code, the IDE compares it to the answer and show's the different between the ideal output and your output.
To explore this repository:
-
Clone the repository:
git clone https://github.com/SurjaHead/hack-computer.git
-
Each project folder contains:
- Source code files
- Test files
- README with project-specific details
- Implementation notes where relevant
-
To run the projects:
- Follow the setup instructions in each project's README
- Use the official nand2tetris software suite available at www.nand2tetris.org
- Official course website: www.nand2tetris.org
- Course textbook: "The Elements of Computing Systems"
- Noam Nisan and Shimon Schocken for creating this amazing course
Note: This is an ongoing project, and some sections may be under development.