Hacker News new | ask | show | jobs
by bugake 42 days ago
I always thought multiplication was one of the most basic things a CPU should handle. Weren't computers invented to perform calculations? Even a pocket calculator could multiply. I assumed CPUs handled arithmetic and not much else. I didn't even learn about bit shifts until much later, and none of the programming languages I was taught ever introduced them.
3 comments

You can ask your favourite LLM agent to give you an overview over earlier CPUs, including pocket calculators, with regards to multiplication. The x86 family of CPUs actually trace its lineage back to a desk calculator.

For something more modern, have a look at how the basic variants of Risc-V don't include multiplication.

A very basic pocket calculator might not have multiplication as an instruction, but multiply by running a simple multi-instruction program. That's how people multiplied on a 6502, too. (Similar also for calculation cosine or square-roots or logarithms: you run a little program.)

The first CPUs were meant to power calculators.
You have much to learn.
And that's an opportunity and a source of fun!