Nand2Tetris: Building a Computer from First Principles

Built a complete 16-bit computer system from NAND gates up through a two-tier software hierarchy, including hardware components, assembler, and VM translator.

⚙️systems📅 March 2021💻 Assembly/HDL⭐ Featured

Technologies Used:

Hardware Description Language (HDL)C

About This Project

A comprehensive computer systems project that constructs a fully functional computer from the ground up. Starting with basic NAND gates, I built all logic gates, an ALU, RAM modules, and a complete CPU following the von Neumann architecture. The hardware platform executes a custom machine language (Hack assembly). On the software side, I implemented an assembler that translates symbolic assembly code to binary machine code, and a VM translator that converts stack-based virtual machine code into assembly language.

Key Features

  • Designed and implemented a 16-bit CPU with ALU, registers, and program counter using hierarchical chip design from 15 primitive logic gates
  • Built complete memory hierarchy including 16K RAM, memory-mapped screen (8K), and keyboard interface for a functional I/O system
  • Developed an assembler in pure C with two-pass symbol resolution, translating symbolic Hack assembly into binary machine code with support for labels, variables, and 18 predefined symbols
  • Created a stack-based VM translator implementing 9 arithmetic/logical operations and 8 memory segment mappings, generating optimized assembly code for virtual machine instructions

📸 Project Gallery

Images

Screen shot from offical course website "https://www.nand2tetris.org/"

Screen shot from offical course website "https://www.nand2tetris.org/"

Project Info

Primary Language
Assembly/HDL
Category
systems
Completion Date
March 2021
Aidan Sabatini - Portfolio