I have always wondered, "What is a computer?" Since childhood, I’ve treated it as a black box. I knew its components: the CPU, input devices, output devices—and their purposes, but I never truly understood how a computer actually works. How does a CPU, which supposedly only understands 1s and 0s, handle code? How does typing print("Hello World!") light up thousands of pixels on the screen? What happens inside the CPU when you write something as simple as x = 5? To answer these questions, my curiosity led me to build Vulcan-16.
Vulcan-16 is a fully functional 16-bit computer designed and implemented from the ground up. Starting with basic logic gates, this project explores the intersection of hardware and software. It’s far from perfect, but that’s the point. Vulcan-16 is my proof that with enough stubbornness, you can turn NAND gates into something that feels alive.
This project is my attempt to turn "How does this even work?!" into "Oh. That’s how." It’s also the longest project I’ve ever worked on, and the one I’ve spent the most time on(at least up to the point of writing this).
The goal of this project is simple yet ambitious: to understand how a computer works by building one from scratch. This means designing every hardware component—from logic gates to the CPU—using HDL (Hardware Description Language), writing software programs in assembly language, implementing a virtual machine and designing a compiler to translate high-level code into machine code.
But Vulcan-16 isn’t just about building a computer. It’s about bridging the gap between theory and practice. Through this project, I aimed to apply the concepts I learned in my university courses—Digital Logic Design (CS201n), Operating Systems Design (CS207n) and Computer System Architecture and Organization(CS206)—to a real, tangible system.
In short, Vulcan-16 is my way of answering the question: "Can I take what I’ve learned in the classroom and use it to create something that actually works?" Spoiler: It’s harder than it sounds, but infinitely more rewarding.
- The 16-bit computer, I built, is based on Harvard Architecture (which is a variant of Von Neumann Architecture).
- The computer consists of:
32K x 16ROM, in which any program can be loaded.24577 x 16memory, composed of16K x 16RAM,8K x 16for the screen memory map, and1 x 16for keyboard input.- The CPU contains a
1 x 16data register, a1 x 16address register, and an ALU capable of performing 18 specified operations.
- Detailed specification can be found in the
readme.mdof sub folders.
Vulcan-16/
├── Hardware/ # HDL implementations of CPU, memory, and peripherals
│ ├── LogicGates/ # Basic gates (AND, OR, NOT, etc.)
│ ├── ALU/ # Arithmetic Logic Unit
│ └── CPU/ # Central Processing Unit
│
├── Software/ # Tools to program Vulcan-16
│ ├── Assembler/ # Translates assembly to machine code
│ ├── Compiler/ # Compiles Jack to VM code
│ └── VMTranslator/ # Converts VM code to assembly
│
├── OS/ # Jack Operating System
│ ├── Sys/ # System services
│ ├── Screen/ # Graphics driver
│ ├── Keyboard/ # Input handling
│ ├── Memory/ # Memory management utilities
│ ├── Math/ # Mathematical operations
│ ├── String/ # String manipulation utilities
│ └── Array/ # Array handling and operations
│
└── Programs/ # Programs for Vulcan-16
└── Games/ # GuessANumberI have created a web-based IDE Vulcan-16 IDE which has two main features: Compiler and Hardware Simulator.
- Translates
.jackfiles to.vm,.asm, and.hackformats. - Converts
.vmfiles to.asmand.hackformats. - Converts
.asmfiles to.hackformat.
- Includes a screen and keyboard status.
- Runs programs after loading them into the ROM.
- Allows users to change RAM values.
- Displays various registers such as D, A, and PC in a proper format and points.
- Open the HDL files in the hardware simulator either in legacy software package or online IDE Hardware Simulator
- Run the simulations.
- Load the assembly program into the CPU emulator either in legacy software package or online IDE CPU Emulator
- Set the initial values in the RAM.
- Run the program and observe the results.
- Load the VM program into the VM emulator either in legacy software package or online IDE VM Emulator or Vulcan-16 IDE.
- Change the execution speed to Fast.
- Run the program and observe the results.
- Load the folder in which Jack programs exist into the Jack compiler either in legacy software package or online IDE Jack Compiler or Vulcan-16 IDE.
- Click on
Compileto compile the Jack programs and then click onRunto load the generated VM code into the VM emulator. - Change the execution speed to Fast.
- Run the program and observe the results.
Develop a web-based hardware simulator and IDE to test various architectures, enabling more flexible experimentation beyond the current setup.(Completed: Check out Vulcan-16 IDE for the web-based hardware simulator and IDE.)- Fix the OS problems.
- Improve the compiler to use the techniques learned from "Compilers: Principles, Techniques, and Tools" by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman to generate more efficient code and maybe migrate to C++ for better performance.
- Translate key hardware chips into popular HDL languages such as Verilog and VHDL to broaden compatibility and integration.
- Port Vulcan-16 onto an FPGA platform to validate designs on actual hardware and enhance performance.
- "Code: The Hidden Language of Computer Hardware and Software" by Charles Petzold.
- "The Elements of Computing Systems: Building a Modern Computer from First Principles" by Noam Nisan and Shimon Schocken.
- "Digital Design" by M. Morris Mano.
- "Computer System Architecture" by M. Morris Mano.
- "Compilers: Principles, Techniques, and Tools" by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman.
- Nand2tetris course materials.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Noam Nisan and Shimon Schocken for the Nand2tetris course and book.
- Charles Petzold and M. Morris Mano for their respective books.
- Mark Armbrust for the Random.jack file.
- The Open Source community for support and resources.





