News: 1706866213

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Building a 16-bit CPU in a spreadsheet is Excel-lent engineering

(2024/02/02)


Microsoft Excel was used for many purposes over the years from accounting to 3D rendering, yet implementing a 16-bit CPU in the spreadsheet is something else.

[1]Shown off by InkboxSoftware and viewable in a handy video, the implementation is not a clone of the popular 16-bit CPUs with which readers might be familiar, like Intel's 8086 or Texas Instruments' TMS9900. It instead has its own custom instruction set architecture consisting of 23 instruction mnemonics and 26 opcodes.

[2]Youtube Video

[3]

It's all you need to run some simple programs. Sure, something like the TMS9900 is a bit more capable – yes, this writer used to tinker with assembly on a TI99/4a more than 40 years ago – but there is a certain delight in seeing the CPU's design laid out in Excel form, particularly since the author was able to avoid using VBScript.

[4]

[5]

As well as the 16-bit CPU and 16 general-purpose registers, there is 128 KB of RAM and a 128x128 display.

[6]Cybercrooks amp up attacks via macro-enabled XLL files

[7]It is 2023 and Excel's reign of date terror might finally be at an end

[8]Royal College considers no confidence move after Excel recruitment debacle

[9]Excel Hell II: If the sickness can't be fixed, it must be contained

We fired up the spreadsheet, and everything appeared to work after a fashion (we're not joking about slow performance). The CPU runs at around 2-3 Hz, a far cry from modern hardware but ideal for seeing what is actually happening under the hood. The Reg advises not mashing the F9 key to get things to run faster – one has to wait until Excel has finished updating its cells before starting the next cycle – but we can see where a bit of VBScript might be helpful to keep things moving.

Still, the implementation is hugely impressive. As the author says: "Is it possible? It's the best kind of possible – theoretically possible."

The Excel 16-bit CPU is the latest in a long line of unconventional processors, including [10]CHUNGUS 2 in Minecraft and the [11]Megaprocessor at the Centre for Computing History in Cambridge. The latter, created by James Newman, consists of seven panels and measures two meters high and nearly ten meters end to end. It can also run at a dizzying 20 KHz, although it can be slowed down to 0.01 Hz to permit the flow of data to be viewed. Individual LEDs represent every bit of the device's 256 bytes of RAM.

[12]

With AI tools and low-code abstracting developers further and further away from what is actually happening inside a computer, it is difficult not to applaud efforts to show exactly what is going on behind the scenes to render "Hello, World!" ®

Get our [13]Tech Resources



[1] https://github.com/InkboxSoftware/excelCPU

[2] https://youtu.be/5rg7xvTJ8SU?si=NVslhHPrIM_SBWK5

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_offbeat/bootnotes&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2ZbzLXV7pPAZMXQUlFYXJMgAAAc4&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_offbeat/bootnotes&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZbzLXV7pPAZMXQUlFYXJMgAAAc4&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_offbeat/bootnotes&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33ZbzLXV7pPAZMXQUlFYXJMgAAAc4&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[6] https://www.theregister.com/2023/11/01/xll_macro_attack_surge/

[7] https://www.theregister.com/2023/10/23/excel_date_format_feature/

[8] https://www.theregister.com/2023/10/20/royal_college_excel_blunder/

[9] https://www.theregister.com/2023/10/16/excel_hell_comment/

[10] https://youtu.be/FDiapbD0Xfg?si=yfHVofJl8A16CuGO

[11] https://www.computinghistory.org.uk/det/43063/The-Megaprocessor/

[12] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_offbeat/bootnotes&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZbzLXV7pPAZMXQUlFYXJMgAAAc4&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[13] https://whitepapers.theregister.com/



Many thanks Richard!!

Mike 137

" With AI tools and low-code abstracting developers further and further away from what is actually happening inside a computer, it is difficult not to applaud efforts to show exactly what is going on behind the scenes to render "Hello, World!" "

Yes indeed! This understanding is what's primarily missing from the training of current developers, and its absence contributes greatly to the prevalence of low level vulnerabilities, a typical example being failure to recognise the difference between signed and unsigned integers. Instead of providing the necessary understanding at training time, we create successive generations of languages that either exclude hazardous operations or conceal them from the developer, so understanding deteriorates even further.

Ross 12

Any software patches for Excel would be like a microcode update for the processor, I love it!

Always impressive

Pascal Monett

The amount of work some people will go through to make stuff that works where you'd never think of doing that is impressive.

A CPU in Minecraft. DOOM on bacteria (okay, it's the bacteria that are working, but still). The list goes on (and on).

It seems that there is always someone who looks at a thing and thinks "hey, can I make it do ?".

I think that is the definition of art. It's useless, but it can be beautiful.

Re: Always impressive

wolfetone

" It seems that there is always someone who looks at a thing and thinks "hey, can I make it do ?". "

If it weren't for household chores and the need to procrastinate, we'd never get stuff like this done.

Re: Always impressive

Mike 137

" DOOM on bacteria (okay, it's the bacteria that are working, but still) "

Actually it didn't use live bacteria, it was a simulation -- [1] [paragraph 2] PhD student researcher Lauren "Ren" Ramlan has coaxed a simulation of the humble E. coli bacteria into a rudimentary screen capable of displaying the iconic video game .

[1] https://www.theregister.com/2024/01/31/bacteria_runs_doom/

If life is a stage, I want some better lighting.