ββββ ββββββββββββββββββββββ βββββββ ββββββ
βββββ ββββββββββββββββββββββββββββββββ ββββββββ
ββββββ ββββββ βββ βββββββββββ βββββββββββββββββ
βββββββββββββ βββ βββββββββββ βββββββββββββββββ
βββ βββββββββ βββ βββ ββββββββββββ ββββββββ
βββ ββββββββ βββ βββ βββ βββββββ ββββββ
Nitro-8 is a fully functional 8-bit CPU designed and built entirely from scratch in Logisim Evolution β featuring a hardwired ALU, custom 16-instruction ISA, banked ROM, 256-byte RAM, a 16Γ16 RGB pixel display, and a modular 20-unit sprite storage system.
- Overview
- Features
- Architecture
- Live Simulation
- Circuit Overview
- Instruction Set
- RGB Display
- Storage System
- Python Assembler
- Demo Programs
- Build Order
- Tools Used
- Project Structure
- Author
- License
Nitro-8 is a custom 8-bit processor built entirely from logic gates up β no shortcuts, no black-box components. Every subsystem, from the half adder at the bottom of the ALU to the MUX-driven sprite storage at the top, was constructed and verified gate by gate inside Logisim Evolution.
The CPU can fetch, decode, and execute real assembly instructions, perform arithmetic and bitwise operations, read and write memory, and render pixel-art graphics on a live 16Γ16 RGB display β all in a single integrated circuit.
Built as part of a Computer Architecture course at NFC IET Multan, this project demonstrates end-to-end understanding of digital logic, processor microarchitecture, memory systems, and low-level programming.
| Category | Capability |
|---|---|
| ALU | ADD, SUB, AND, OR, XOR, NOT, SHL, SHR β all 8-bit |
| Registers | RegA, RegB β two general-purpose 8-bit registers |
| Program Counter | 8-bit PC with increment, load, and synchronous reset |
| Instruction Register | 16-bit IR with opcode / operand split |
| Control Unit | Hardwired, decodes 16+ instructions into micro-signals |
| RAM | 256 Γ 8 read/write data memory |
| ROM | 2048 Γ 16 banked program memory with SETBANK switching |
| Video | 16Γ16 RGB display, XTerm256 8-bit color, direct pixel write |
| Storage | 20 independent Sprite Unit ROMs, MUX-selected |
| Assembler | Custom Python assembler β Logisim ROM hex format |
| Control Flow | JMP, JZ (conditional), HLT, NOP |
| Reset | Full synchronous reset across all registers and memory |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NITRO-8 CPU β
β β
β Clock βββΊ PC βββΊ ROM / Storage βββΊ IR βββΊ Control Unit β
β β β
β ββββββββββββββββββββββ β
β βΌ β
β RegA βββΊ ALU βββ RegB β
β β β
β βββββββββββ΄βββββββββββ β
β βΌ βΌ β
β VideoRAM βββΊ RGB Display RAM (data) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Half Adder β Full Adder β 8-bit Ripple Carry Adder
- 8-bit ALU (8 operations)
- 8-bit D flip-flop Register Γ 2
- 8-bit Program Counter (inc / load / reset)
- 16-bit Instruction Register (opcode + operand split)
- Hardwired Control Unit (16 instructions)
- RAM8 β 256Γ8 synchronous read/write
- ROM8 β 2048Γ16 with bank switching
- VideoRAM β direct pixel write to RGB Video component
- Storage System β 20 Unit ROMs, 5-bit MUX selection
Nitro-8 live simulation β the CPU fetching, decoding, and executing sprite programs, cycling through all 20 Storage Units and painting pixel art on the 16Γ16 RGB display.
Complete Nitro-8 CPU β ALU, registers, PC, ROM, RAM, control unit, and video display, all wired and running.
![]() Hardwired Control Unit decoding 16+ instructions into micro-control signals |
![]() 20-Unit Sprite Storage System with MUX-based selection |
![]() 8-bit Ripple Carry Adder built from full adder chains |
![]() 256Γ8 synchronous RAM with read/write support |
![]() 8-bit Program Counter with increment, load, and synchronous reset |
![]() 16-bit Instruction Register splitting opcode and operand |
| Opcode | Mnemonic | Operation |
|---|---|---|
10nn |
LOAD_A n |
RegA β n |
11nn |
LOAD_B n |
RegB β n |
2000 |
ADD |
RegA β RegA + RegB |
2100 |
SUB |
RegA β RegA β RegB |
2200 |
AND |
RegA β RegA AND RegB |
2300 |
OR |
RegA β RegA OR RegB |
30nn |
STORE n |
RAM[n] β RegA |
40nn |
JMP n |
PC β n |
50nn |
JZ n |
if RegA = 0 β PC β n |
60nn |
VSTORE n |
VideoRAM[n] β RegA (color) |
6100 |
VSTORE_B |
VideoRAM[RegB] β RegA |
7000 |
INC |
RegA β RegA + 1 |
7100 |
INC_B |
RegB β RegB + 1 |
80nn |
LOAD_RAM n |
RegA β RAM[n] |
90nn |
SETBANK n |
ROM bank β n |
F000 |
HLT |
Halt execution |
0000 |
NOP |
No operation |
The Nitro-8 drives a 16Γ16 pixel RGB display using Logisim Evolution's RGB Video component in XTerm256 8-bit color mode, giving 256 distinct colors addressable by a single byte.
Pixel addressing:
Address = (row β 1) Γ 16 + (col β 1)
Row 1, Col 1 β 0x00 Row 16, Col 16 β 0xFF
Programs rendered on the display:
- Alphabet letters β N, I, T, R, O, 8
- Pixel-art sprites β heart, robot, rocket, car
- Rainbow stripe fill
- Checkerboard and border patterns
- Diagonal X pattern
The Storage subsystem contains 20 independent Unit ROMs. Each Unit holds one complete sprite or letter program. A 5-bit counter advances the active Unit via a MUX β when one program halts, the next Unit fires automatically.
Storage
βββ Unit 01 β Letter N
βββ Unit 02 β Letter I
βββ Unit 03 β Letter T
βββ Unit 04 β Letter R
βββ Unit 05 β Letter O
βββ Unit 06 β Letter 8
βββ Unit 07 β Sprite (expandable)
βββ ...
βββ Unit 20 β (expandable)
The project ships a Python assembler that compiles human-readable Nitro-8 assembly into the hex format expected by Logisim's ROM editor.
python assembler.pyInput β Output example:
; Source
LOAD_A 05
LOAD_B 03
ADD
HLT; ROM hex output
1005 0000 1103 0000 2000 0000 F000 0000
0000 0000 0000 0000 ... (padded to 256 entries)
NOPs are automatically inserted between instructions to satisfy the CPU's fetch cycle, and output is zero-padded to 256 entries for direct paste into the Logisim ROM editor.
5 + 3 = 8 Β (arithmetic)
LOAD_A 05
LOAD_B 03
ADD
HLTCountdown 5 β 0 Β (loop + branch)
LOAD_A 05
LOAD_B 01
SUB ; RegA = RegA - 1
JZ 0B ; if zero β halt
JMP 02 ; else loop
HLTDraw pink heart Β (VSTORE pixel painting)
LOAD_A D3 ; XTerm256 pink
VSTORE 34
VSTORE 35
VSTORE 37
VSTORE 38
; ... remaining pixel addresses
HLTThe CPU was assembled incrementally, each layer verified before the next was added:
1 Half Adder 11 RAM
2 Full Adder 12 JMP + JZ instructions
3 8-bit Ripple Carry Adder 13 RGB Video Display
4 ALU 14 VSTORE + VSTORE_B
5 8-bit Register 15 INC + INC_B
6 Program Counter 16 LOAD_RAM
7 ROM 17 SETBANK + bank switching
8 Instruction Register 18 Storage system (20 Units)
9 Control Unit 19 Python assembler
10 Main CPU integration
| Tool | Version | Purpose |
|---|---|---|
| Logisim Evolution | v4.1.0 | Circuit design & simulation |
| Python | 3.x | Custom assembler |
| Git | β | Version control |
| GitHub | β | Hosting & CDN asset delivery |
Nitro-8/
βββ CPU.circ β Main Logisim circuit
βββ assembler.py β Python assembler
βββ README.md
βββ assets/
β βββ demo/
β β βββ demo1.gif β Live simulation recording
β βββ screenshots/
β βββ main.png β Full CPU circuit
β βββ ControlUnit.png β Hardwired control unit
β βββ StorageUnit.png β 20-unit sprite storage
β βββ Screen.png β RGB display output
βββ programs/ β Assembly programs (coming soon)
Noman Rafique (Nomi)
BS Artificial Intelligence Β Β·Β NFC IET Multan, Pakistan Semester 2 Β Β·Β GPA 4.0 / 4.0
This project is open source and available under the MIT License.








