I built my own 16-Bit CPU in Excel

Inkbox2 minutes read

Excel can be used to build a 16-bit CPU with custom ISA and detailed components, enabling complex computations through formulas combining binary logic and intel conversion. The program EXCEL-ASM16 offers interactive lessons for learning Computer Science, Math, and Data Analysis in short daily sessions, with the ability to run larger programs and manipulate values on the 4K screen.

Insights

  • Excel can serve as a platform to design and simulate complex computing systems, including a 16-bit CPU, through the use of custom Instruction Set Architectures (ISA) and various units like the Fetch Unit, Control Unit, and Arithmetic Logic Unit (ALU).
  • The ISA for the Excel CPU encompasses 25 opcodes and 23 instruction mnemonics, highlighting the detailed programming capabilities within Excel, involving storing instructions, fetching, decoding, executing, and storing outputs, akin to traditional computing processes.

Get key ideas from YouTube videos. It’s free

Recent questions

  • What can Excel be used for?

    Excel functions as an advanced calculator, capable of emulating a computer at a low level.

Related videos

Summary

00:00

"Building a 16-bit CPU in Excel"

  • Excel file contains a 16-bit CPU, 128 Kilobytes of RAM, and a 4K monitor, without Visual Basic Scripts or plugins.
  • Spreadsheets function as advanced calculators, with Excel capable of emulating a computer at a low level.
  • Excel formulas, combining binary logic and integer conversion, enable complex computations within the spreadsheet.
  • Brilliant offers interactive lessons for learning Computer Science, Math, and Data Analysis in short daily sessions.
  • Excel's clock signal can be built using a simple formula and iterative calculation settings.
  • Physical alignment of values in Excel is crucial for components like the JK flip flop to function correctly.
  • Designing a 16-bit CPU in Excel involves creating a custom Instruction Set Architecture (ISA) with specific registers and instructions.
  • The ISA for the Excel CPU includes 25 opcodes and 23 instruction mnemonics for various operations.
  • Programming in Excel involves storing instructions in memory, fetching, decoding, executing, and storing outputs.
  • Building the CPU in Excel includes units like the Fetch Unit, Control Unit, Arithmetic Logic Unit (ALU), and Program Counter.

10:54

"EXCEL-ASM16 Compiler Enhances Memory Programming"

  • The Fetch Unit can now grab two units of memory from the address in the PC register, with added Reset and Manual buttons for resetting PC and RAM to 0 and specifying instructions in manual mode.
  • The first multiplexer reads from two memory spots, necessitating the addition of a 26th LOAD instruction for indirect addressing in programs.
  • The 4K screen uses the last 4KB of RAM, with a 128x128 cell display, each representing one pixel, with a 16-color display controlled by one word in memory.
  • A program in EXCEL-ASM16 can change the first four pixels of the screen to red, blue, green, and yellow by setting registers and storing values.
  • A compiler named EXCEL-ASM16 allows for running larger programs from memory, featuring 23 instructions, variable definitions, labels, comments, and the ability to include binary files directly into the program.
Channel avatarChannel avatarChannel avatarChannel avatarChannel avatar

Try it yourself — It’s free.