4 ms·
You might be surprised to learn that the calculator chip cannot perform multiplication natively. There's no floating point unit to multiply two numbers. Instead
by userbinator 5y ago
You might be surprised to learn that the calculator chip cannot perform multiplication natively. There's no floating point unit to multiply two numbers. Instead, multiplication is performed through repeated addition, digit by digit.
I believe all the ultra-cheap 4-function calculator ASICs do this or something similar; the speed is not at all important, but die area and resulting price are.
- fsckboy 5y ago> through repeated addition, digit by digit when i read ideas like this I'm not sure what they mean none of the early microprocessors had multiply instructions, but you can carry out a binary multiply using repeated shift+add, and if you don't have a shift you can add a number to itself and that's a shift... so all you are doing is adding but it's not the naive idea of adding a number over and over to simulate multiplication or do they mean digit by digit and they are doing BCD multiplies? again, not that many adds are being performed so it's not a performance nightmare. youngbloods don't realize how rarely a C programmer would invoke a multiply (or really need to) (and NEVER inside a loop) even a decade after these early calculators
- kens 5y agoThe multiplies are done by repeated BCD addition, one digit at a time, along with BCD shifting, equivalent to multiplication by 10.