All Projects → NidalFikri → The Hack General Purpose Computer

NidalFikri / The Hack General Purpose Computer

Using HDL, from Boolean algebra and elementary logic gates to building a Central Processing Unit, a memory system, and a hardware platform, leading up to a 16-bit general-purpose computer. Then, implementing the modern software hierarchy designed to enable the translation and execution of object-based, high-level languages on a bare-bone computer hardware platform; Including Virtual machine,Compiler and Operating system.

Programming Languages

python
139335 projects - #7 most used programming language
assembler
53 projects

Projects that are alternatives of or similar to The Hack General Purpose Computer

Ark
ArkScript is a small, fast, functional and scripting language for C++ projects
Stars: ✭ 312 (+700%)
Mutual labels:  compiler, virtual-machine
Ph7
An Embedded Implementation of PHP (C Library)
Stars: ✭ 422 (+982.05%)
Mutual labels:  compiler, virtual-machine
V8
The official mirror of the V8 Git repository
Stars: ✭ 18,808 (+48125.64%)
Mutual labels:  compiler, virtual-machine
SherwoodArch
The Sherwood Architecture is a custom 64-Bit RISC based CPU architecture.
Stars: ✭ 13 (-66.67%)
Mutual labels:  cpu, virtual-machine
Customarch
Arch Linux Based Custom ISOs Made With "Archiso"
Stars: ✭ 606 (+1453.85%)
Mutual labels:  operating-system, virtual-machine
Smlvm
Smallrepo Virtual Machine
Stars: ✭ 265 (+579.49%)
Mutual labels:  compiler, virtual-machine
Phantomuserland
Phantom: Persistent Operating System
Stars: ✭ 412 (+956.41%)
Mutual labels:  operating-system, virtual-machine
Freeze-OS
An Operating System that runs on top of an interpreter.
Stars: ✭ 24 (-38.46%)
Mutual labels:  virtual-machine, operating-system
Pl Compiler Resource
程序语言与编译技术相关资料(持续更新中)
Stars: ✭ 578 (+1382.05%)
Mutual labels:  compiler, virtual-machine
Flingos
An educational operating system written in C#. A great stepping stone from high to low level development.
Stars: ✭ 451 (+1056.41%)
Mutual labels:  compiler, operating-system
nautilus
Nautilus Aerokernel
Stars: ✭ 30 (-23.08%)
Mutual labels:  virtual-machine, operating-system
Ring
Innovative and practical general-purpose multi-paradigm language
Stars: ✭ 716 (+1735.9%)
Mutual labels:  compiler, virtual-machine
wiser
🐎 Extremely minimal vmm for linux written in C. Hopefully someday will spin linux-vm for you.
Stars: ✭ 249 (+538.46%)
Mutual labels:  virtual-machine, operating-system
Umka Lang
Umka: a statically typed embeddable scripting language
Stars: ✭ 308 (+689.74%)
Mutual labels:  compiler, virtual-machine
TinyMIPS
The Project TinyMIPS is dedicated to enabling undergraduates to build a complete computer system from scratch.
Stars: ✭ 29 (-25.64%)
Mutual labels:  cpu, operating-system
Ilgpu
ILGPU JIT Compiler for high-performance .Net GPU programs
Stars: ✭ 374 (+858.97%)
Mutual labels:  compiler, cpu
Advanced-xv6
Modern improvements for MIT's xv6 OS
Stars: ✭ 26 (-33.33%)
Mutual labels:  cpu, operating-system
register-rs
Unified interface for type-safe MMIO and CPU register access in Rust
Stars: ✭ 48 (+23.08%)
Mutual labels:  cpu, operating-system
16bitjs
💻 A 16-bit virtual machine, including assembly language with 37 instructions, binary assembler, and a step through debugger
Stars: ✭ 427 (+994.87%)
Mutual labels:  cpu, virtual-machine
Minic Hosting
A simple stack-based virtual machine that runs C in the browser.
Stars: ✭ 628 (+1510.26%)
Mutual labels:  compiler, virtual-machine

The-HACK-General-Purpose-Computer

What I hear, I forget; What I see, I remember; What I do, I understand. —Confucius, 551–479 BC

The Nand to Tetris project is about going into fascinating voyage of discovery in which I go all the way from Boolean algebra and elementary logic gates to building a Central Processing Unit, a memory system, and a hardware platform, leading up to a general-purpose computer that can run any program that you fancy. This is typically the hardware part of the overall project which relies on many sub-projects waiting to be assembled togther.

There is no need for physical materials, since I build the computer on my own PC, using a software-based hardware simulator, just like real computers are designed by computer engineers in the field.

In the second part of the overall project: we 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, I will implement a virtual machine and a compiler for a simple, Java-like programming language, and I will develop a basic operating system that closes gaps between the high-level language and the underlying hardware platform.

During the process, gaining 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.

What is going on here in a nutshell?

overview

  • Hardware: Logic gates, Boolean arithmetic, multiplexors, flip-flops, registers, RAM units, counters, Hardware Description Language (HDL), chip simulation and testing.
  • Architecture: ALU/CPU design and implementation, machine code, assembly language programming, addressing modes, memory-mapped input/output (I/O).
  • Operating systems: Memory management, math library, basic I/O drivers, screen management, file I/O, high-level language support.
  • Programming languages: Object-based design and programming, abstract data types, scoping rules, syntax and semantics, references.
  • Compilers: Lexical analysis, top-down parsing, symbol tables, virtual stackbased machine, code generation, implementation of arrays and objects.
  • Data structures and algorithms: Stacks, hash tables, lists, recursion, arithmetic algorithms, geometric algorithms, running time considerations.
  • Software engineering: Modular design, the interface/implementation paradigm, API design and documentation, proactive test planning, programming at the large, quality assurance.

Todo list:

Sub-projects in real-time progress.

Computer Hardware & Architecture

  • 1-Elementary Logic Gates:✔️ Building elementary logic gates like And, Or, Not, Multiplexor, and more
  • 2-Adders Family & ALU:✔️ Building a family of adder chips, culminating in the construction of an Arithmetic Logic Unit (ALU)
  • 3-Memory Units:✔️ Building registers and memory units, culminating in the construction of a Random Access Memory (RAM)
  • 4-HACK Machine Language:✔️ Learning a machine language and using it to write some illustrative low-level programs
  • 5-Computer Architecture & CPU:✔️ Using the chipset built in projects 1-3 to build a Central Processing Unit (CPU) and a hardware platform capable of executing programs written in the machine language introduced in project 4.

Computer Software Hierarchy

  • 6-HACK Assembler:✔️ Developing an assembler, i.e. a capability to translate programs written in symbolic machine language into binary, executable code.
  • 7-Virtual Machine I: (Stack Arithmetic)✔️ Building a stack-based virtual machine. This implementation, in turn, will serve as the backend module of the two-tier compiler that will be developed later. In this first part, stack-based arithmetic operations & memory access operations will be handled.
  • 8-Virtual Machine II: (Program Control)✔️ In this project I'll complete the VM translator by implementing the remaining VM language's branching and function-calling commands. Implementing concepts like: program flow (if statments), loops (while), function calling (stack frame saving & retrieving) ...etc.
  • 9-High-Level Language:✔️ Designing and creating the JACK high level programming language; object-based Java-like language. Implemented concepts: procedural programming, object-based programming, classes, methods, functions, constructors, list processing, recursion, developing interactive applications (Hell Arena Game), graphics optimization.
  • 10-Compiler I: (Syntax Analysis)✔️ Creating the two-tier complier for the JACK high level language. Syntax analysis consists of two sub-stages: lexical analysis (also called tokenizing), and parsing. The result will be a Jack analyzer - a program that unveils the syntax of Jack programs without generating executable code. Key concepts: tokenizing, grammars, parsing, parse trees, XML / mark-up, compilation.
  • 11-Compiler II: (Code Generation)⏳ Finalizing the compiler for the JACK high level language. I'll morph the previous analyzer into a full-scale Jack compiler. Generating VM code that translates procedural programs into VM programs, and how to generate VM code for constructing and manipulating arrays and objects. Key concepts: compiling procedural code, compiling the construction and manipulation of arrays and objects, code generation techniques, recursive compilation engine, symbol tables, memory management.
  • 12-More fun to go?: Implementing full but simple Operating system for the HACK computer.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].