Giter Club home page Giter Club logo

nand2tetris's Introduction

nand2tetris

My solutions to the nand2tetris course on building a computer system, starting only with NAND logic gates and ending with a working game of 2048:

Projects

Project Title Languages Notable Work
1
2
3
Boolean Logic
Boolean Arithmetic
Sequential Logic
HDL - ALU
4 Machine Language Hack assembly - Fill.asm
5 Computer Architecture HDL - CPU
6 Assembler Python - Assembler
7
8
VM I: Stack Arithmetic
VM II: Program Control
Python - VM translator
- Assembly code generation
9 High-Level Language Jack - 2048 game main loop
- 2048 game board manipulation and rendering
10
11
Compiler I: Syntax Analysis
Compiler II: Code Generation
Python - VM compilation engine
- Jack tokenizer
- Symbol table
- VM writer
- Helper functions and utils
12 Operating System Jack - OS Memory module with basic defrag support

Reference for languages used

Language Extension Description
HDL .hdl A hardware description language for describing circuits of logic gates.
Hack machine .hack A 16-bit machine language for the Hack computer, a von Neumann platform with CPU, instruction memory, data memory, and memory-mapped screen and keyboard for I/O.
Hack assembly .asm A human-readable assembly language for the Hack machine language.
VM .vm The language associated with the stack-based virtual machine as specified in The Elements of Computing Systems chapters 7 and 8.
Jack .jack A high-level, object-based programming language inspired by languages like Java or C#.

Note

The code (especially Python) may not be 100% polished and will trigger linters, with issues such as the following.

  • inconsistency with case types when naming functions and attributes (e.g. compileClass vs current_token)
  • unused imports and names (e.g. here and here)
  • f-strings with no placeholders (e.g. in here)
  • lines that have been commented out that will never be used (e.g. here)

Based on the Nand2tetris Software Suite.

nand2tetris's People

Contributors

isnbh0 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.