Skip to content

Project implementations for the NAND2Tetris (Elements of Computing Systems) course, building a complete computer system from NAND gates to a functional CPU using HDL and low-level system design.

License

Notifications You must be signed in to change notification settings

wasitkrish/NAND2Tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a computer from logic gates to a functioning CPU


💻 NAND2Tetris – Elements of Computing

This repository contains my project work for the NAND2Tetris: Elements of Computing Systems course, completed as part of the Elements of Computing curriculum in my B.Tech program.

NAND2Tetris is a bottom-up exploration of computer systems — constructing an entire computer from NAND gates to a working CPU, purely from first principles. This repository documents my implementations across multiple stages of that journey.

🚀 Completed Projects: 1, 2, 3, and 5 from the official NAND2Tetris project sequence.


📌 Completed Projects

Project 1 – Logic Gates
Implementation of fundamental and composite logic gates using only NAND gates in HDL.

Project 2 – Arithmetic Logic
Construction of arithmetic circuits including adders and the Arithmetic Logic Unit (ALU).

Project 3 – Sequential Logic
Design of flip-flops, registers, and RAM modules.

Project 5 – Computer Architecture
Complete implementation of the Hack CPU and memory system.

Each project folder contains HDL source files and official test scripts for verification using NAND2Tetris simulators.


📂 Repository Structure

/project1 → Logic gate implementations /project2 → Arithmetic circuits and ALU /project3 → Sequential circuits and memory /project5 → Hack CPU and memory architecture


⚙️ How to Run & Test

🖥 Online Web IDE:
https://nand2tetris.github.io/web-ide

Steps:

  1. Open the Web IDE
  2. Upload the project files from this repository
  3. Run the provided .tst scripts in the Hardware Simulator or CPU Emulator

🌐 Official Course Resources

Course Website: https://www.nand2tetris.org
Project Instructions: https://www.nand2tetris.org/course


🎓 Course Context

This work was completed as part of the Elements of Computing semester course.

The course develops a deep understanding of computer systems by connecting:

  • Digital logic design
  • Computer architecture
  • Memory organization
  • Low-level system implementation

The emphasis is on learning by building, not theory alone.


🧠 Key Concepts Covered

  • Hardware Description Language (HDL)
  • Digital logic and gate-level design
  • Arithmetic and sequential circuits
  • Memory organization
  • CPU architecture (Hack Computer)

📖 Acknowledgments

Based on the curriculum and materials from:

NAND2Tetris – The Elements of Computing Systems
by Noam Nisan and Shimon Schocken


📜 License

This project is licensed under the MIT License.

Copyright (c) 2026
Krish Singh (github.com/wasitkrish)


About

Project implementations for the NAND2Tetris (Elements of Computing Systems) course, building a complete computer system from NAND gates to a functional CPU using HDL and low-level system design.

Topics

Resources

License

Stars

Watchers

Forks