Skip to content

halder/nand2tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nand To Tetris Coursework

title img

"An idiot admires complexity, a genius admires simplicity."

— Terry A. Davis

Contents

Intro

Building a working, simulated 16-bit computer from first principles. Working through the chapters/projects using Coursera.

Course Resources

Supplementary Resources

A. Simulation - From Logic Gates to the Hack Computer

This is where the journey starts. Building elementary, 16-bit variant (bus input) & multi-way variant logic gates starting from just NAND.

Building upon these basic gates we build the ALU, Memory and eventually the full-blown (albeit simulated) Hack computer.

Similarly to the 16-bit computer, 32-bit (64-bit respectively) computers require 32-bit (64-bit) variants of logic gates.

Summary

Notes / Programs Lecture Slides Related Project
Boolean Logic Boolean Logic 1
Boolean Functions and Gate Logic Boolean Logic 1
Boolean Arithmetic and the ALU Boolean Arithmetic 2
Sequential Logic and Memory Sequential Logic 3
Machine Language Machine Language 4
Architecture Computer Architecture 5
Assembler Assembler 6
Virtual Machine: Architecture VM I: Stack Arithmetic 7
Virtual Machine: Flow VM II: Program Control 8
Compiler: Syntax Analysis Compiler I: Parsing 10

B. Beyond Simulation

When it comes to building the Hack computer from real hardware, there are two options:

  • Using physical logic gates (e.g. on a breadboard)
  • Using Field Programmable Gate Arrays (FPGAs)

At its core, both logic gates and FPGAs are made up of physical transistors.

Transistors

Transistors are the basic building blocks of all logic gates. Although not covered in this course since their inner workings are subject to Physics and Electrical Engineering, understanding how they work is crucial (or at least beneficial) for really understanding NAND & logic gates and everything that builds on top of them.

Resources

Field Programmable Gate Arrays (FPGAs)

FPGAs can be programmed to mimic any chip one can think of (within the borders of the actual limitations imposed by the FPGA itself) using Configurable Logic Blocks (CLBs).

Notes

  • FPGAs cannot process analog signals - limited to digital domain
  • large numbers of CLBs possible, which are programmable and can mimic any logic gate
  • programmable using a HDL such as Verilog or VHDL

Resources