GithubHelp home page GithubHelp logo

mzshuo / nand2tetris Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 19.27 MB

my implementation of the Nand2Tetris's project

Scilab 8.04% Assembly 23.52% Hack 57.51% Python 6.24% HTML 3.91% Batchfile 0.33% Shell 0.45%

nand2tetris's Introduction

Nand2Tetris

  • my implementation of the projects
  • introduction to the course and each project (all pictures below are from course slides)

Course Website

Build a Modern Computer from First Principles: Nand to Tetris Part I

Build a Modern Computer from First Principles: Nand to Tetris Part II

Home | nand2tetris

Course Introduction

In this project-centered course you will build a modern computer system, from the ground up.

In part I we’ll divide this fascinating journey into six hands-on projects that will take you from constructing elementary logic gates all the way through creating a fully functioning general purpose computer. In the process, you will learn - in the most direct and constructive way - how computers work, and how they are designed.

In part II you will build a modern software hierarchy, designed to enable the translation and execution of object-based, high-level languages on a bare-bone computer hardware platform. In particular, you will implement a virtual machine and a compiler for a simple, Java-like programming language, and you will develop a basic operating system that closes gaps between the high-level language and the underlying hardware platform. In the process, you will gain a deep, hands-on understanding of numerous topics in applied computer science, e.g. stack processing, parsing, code generation, and classical algorithms and data structures for memory management, vector graphics, input-output handling, and various other topics that lie at the very core of every modern computer system.

Project Demonstration

demo.mov

Project Info

1. Elementary Logic Gates

  • use HDL (Hardware Discription Language) to implement a set of elementary logic gates like And, Or, Mux, etc.
  • as well as their bit-wise versions And16, Or16, Mux16, etc.
  • all gates are builded upon built-in NAND gate

2. Boolean Arithmetic

  • build a set of chips like HalfAdder, FullAdder, Add16, Inc16

  • construct an ALU (Arithmetic-Logic Unit) chip using builed chips

3. Memory

  • build chips which can store bits persistently over time, including PC, Register, RAM8, RAM16, etc.

  • build a RAM (Random Access Memory) unit using builded chips

4. Machine Language Programming

  • write programs using low-level assembly language which is designed upon Hack instruction set

  • (Assembly programming can be highly rewarding, allowing direct and complete control of the underlying machine.)

5. Computer Architecture

  • construct the Hack CPU (Central Processing Unit)

  • construct the Hack hardware platform - memory chip

  • put all chips together to yield the top-most Computer chip

6. The Assembler

  • write an Assembler program which can translate symbolic Hack assembly code into binary machine code which can execute on the Hack hardware platform

7. Virtual Machine I - Stack Arithmetic

  • build a basic VM translator, focusing on the implementation of the VM language's stack arithmetic and memory access commands.

8. Virtual Machine II - Program Control

  • extend the basic VM translator into a full-scale VM translator

  • implement the VM language's branching and function calling commands

9. High-Level Language

  • write a program in Jack: a simple, Java-like, object-based programming language

10. Compiler I - Syntax Analysis

  • build a syntax analyzer that parses Jack programs according to the Jack grammar

11. Compiler II - Code Generation

  • extend the syntax analyzer into a full-scale Jack compiler

  • write routines which translate Jack command into VM language code

12. Operating System

  • implement the Jack operating system which is a collection of software services such as input/output drivers, math operations, string processing, and memory management

nand2tetris's People

Contributors

mzshuo 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.