nand2tetris/README.md

1.0 KiB

nand2tetris

Working my way through the Nand to Tetris Course

  • Download the latest nand2tetris.zip from the book website, and overwrite everything in the projects and tools directory.
  • Remember to run chmod +X tools/*.sh if you're on *nix.

Project 1: Boolean Logic

Build order as per the website. Cost for each gate in NAND in brackets.

  • Nand (primitive)
  • Not (1)
  • Or (3)
  • Xor (6, Can be improved)
  • And (2)
  • Mux (8, Took me ages. Can be improved)
  • DMux (5, Super Fun)
  • Not16 (16)
  • And16 (32)
  • Or16 (48)
  • Mux16 (113)
  • Or8Way (21)
  • Mux4Way16 (339)
  • Mux8Way16 (791)
  • DMux4Way (37, Fun)
  • DMux8Way (101)

Project 2: Boolean Arithmetic

  • HalfAdder (Xor+And)
  • FullAdder (2 x HalfAdder, 1 Or)
  • Add16 (1 x HalfAdder, 15 x FullAdder)
  • Inc16 (1 x Add16)
  • ALU (nostat)
  • ALU (complete)