I built my own 16-Bit CPU in Excel
Summary
TLDRThe video details the speaker's project of building a fully functional 16-bit CPU inside a regular Excel spreadsheet, using only native Excel formulas and features. It walks through the design and implementation of the CPU components like the control unit, registers, ALU, memory, and an instruction set architecture. A custom assembly language, compiler, and sample programs are created to demonstrate running code on the Excel CPU. Despite slow speeds, it serves as an interactive tool to visualize a basic CPU's inner workings one cycle at a time.
Takeaways
- 😀 Built a fully functioning 16-bit CPU in Microsoft Excel using only formulas
- 💡 Designed a custom 16-bit instruction set architecture with 25 opcodes and 23 instructions
- 🤯 Compiled programs written in a custom assembly language EXCEL-ASM16 using a Python compiler
- 📊 Fetched, decoded and executed instructions using an ALU and control unit formulas
- 🖥️ Included general purpose registers, flags, program counter and 128KB RAM in the spreadsheet
- 👨💻 Wrote programs to draw graphics, play music and run algorithms on the Excel CPU
- ⏱️ Ran the CPU at only 2-3 Hz by manually advancing the clock signal making it very slow
- 📺 Built a 128x128 pixel display with 16 color options using 4KB of the RAM
- 🔌 Added handy buttons for resetting, running in manual mode and reading compiled programs
- 🆕 Made the CPU design, compiler and sample programs available for download to try yourself
Q & A
What is the CPU built in this project based on?
-The CPU is built in Excel based on a custom 16-bit instruction set architecture designed specifically for this project.
How much RAM does the system have?
-The system has 128 KB of RAM.
What is the purpose of the Control Unit?
-The Control Unit decodes the opcode and operands from the instruction and produces the necessary signals to control other parts of the CPU.
How are system flags like carry, zero, sign, and overflow set?
-The carry flag is set when the ALU result exceeds 16 bits. The zero flag checks if the ALU result is 0. The sign flag checks the top bit of the ALU result. The overflow flag checks for overflow conditions.
What is the purpose of the Program Counter?
-The Program Counter contains the address of the next instruction to execute. It handles sequencing through a program.
How is video output achieved?
-The last 4KB of RAM is used as video RAM, representing a 128x128 pixel display with 16 colors. Conditional formatting simulates pixels.
What programming language is used for compilation?
-A custom assembly language called EXCEL-ASM16 was designed for the instruction set. Compilation is handled externally in Python.
How are compiled programs loaded into the system?
-Compiled code is saved to a separate Excel spreadsheet acting as ROM. A switch allows the CPU to read from this ROM.
What is the purpose of the manual override?
-A manual override mode allows instructions to be directly specified, useful for testing during development.
How fast can the CPU run?
-The purely formula-based Excel implementation allows a speed of only 2-3 Hz, requiring manual advancement of the clock signal.
Outlines

This section is available to paid users only. Please upgrade to access this part.
Upgrade NowMindmap

This section is available to paid users only. Please upgrade to access this part.
Upgrade NowKeywords

This section is available to paid users only. Please upgrade to access this part.
Upgrade NowHighlights

This section is available to paid users only. Please upgrade to access this part.
Upgrade NowTranscripts

This section is available to paid users only. Please upgrade to access this part.
Upgrade NowBrowse More Related Video

Mengenal Data Angka | Materi Informatika/TIK SMP Kelas 7

How to keep Inventory using an Excel Spreadsheet - [create your own Template]

21. Literasi Digital - Pengenalan Microsoft Excel - Informatika Kelas X

Importance Of Excel In Data Analysis | Fresher | Datawithkishan

How to Start Making Money with Excel (For All Skill Levels)

TECH-005 - Create a quick and simple Time Line (Gantt Chart) in Excel
5.0 / 5 (0 votes)