Skip to content

Project done for the course "Build a Modern Computer from First Principles: From Nand to Tetris"

Notifications You must be signed in to change notification settings

momed-0/nand2tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains my projects and accompanying materials for the Nand2Tetris course. The course offers a hands-on approach to learning digital logic design and computer architecture. Throughout the course, I built a complete 16-bit computer system from the ground up, starting with basic logic gates and progressing to high-level programming.

Project 01 Boolean Logic and Gates

In this project, I implemented fundamental logic gates, such as AND, OR, and NOT, using the HDL (Hardware Description Language). I also built more complex gates like NAND and XOR using the elementary gates.

Project 02 Boolean Arithmetic and the ALU

Building upon the previous project, I designed the arithmetic logic unit (ALU) capable of performing basic arithmetic and logical operations on binary numbers. By combining the ALU with previously created chips, I created more complex components.

Project 03 Sequential Logic

This project introduced me to sequential logic, where the output depends not only on the current inputs but also on past inputs. I implemented flip-flops, registers, and memory units using the HDL.

Project 04 Machine Language

In this project, I delved into low-level machine language. I learned to write programs in symbolic assembly language and execute them on the computer system I built in subsequent projects.

Project 05 Computer Architecture

I designed and implemented a central processing unit (CPU) capable of executing machine language instructions. By connecting the previously constructed components with memory units, I created a functional CPU.

Project 06 Assembler Written Using C++

Description

The assembler is implemented in C++ and consists of several components that work together to perform the translation process. The main components are:

  • Parser: This component is responsible for parsing the assembly code and extracting meaningful instructions and symbols.
  • SymbolTable: The SymbolTable component manages a symbol table that stores the labels and their corresponding memory addresses.
  • Main Function: The main function orchestrates the overall process, including file handling, preprocessing, symbol table generation, and code translation.

Executing the Files

Using the Hardware Simulator and CPU emulator ,you can run the different files and test the Computer.Also you can run the Pong game (assembly file provided in Project 06 ) using the CPU emulator.

About

Project done for the course "Build a Modern Computer from First Principles: From Nand to Tetris"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published