| I forgot to mention another thing he didn't know was useful d) BCD instructions, which he thinks are "kind of silly", and perhaps they are now that computers run at many GHz. But they were very useful in the old days. E.g. CBASIC [1] implemented BCD floating point math. Here's what Wiki says about it: CBASIC proved very popular because it
incorporated 14-digit binary-coded decimal
(BCD) math which eliminated MBASIC's rounding
errors that were sometimes troublesome for
accounting.
As the reference manual linked [2] from Wiki says: Real numbers are stored in eight bytes of
memory. The first byte is the sign and
exponent. The exponent is maintained in
excess 64 code. The seven remaining bytes
contain a normalized mantissa stored as
packed decimal digits. The high order four
bits of the rightmost byte is the most
significant digit of the mantissa.
That was of course long before IEEE 754 floating point.[3] BTW did anyone know that IEEE defined decimal floating point? I didn't know that until just now. It's probably not that popular.When a CPU runs at 1 MHz instead of 3 GHz, doing FP in BCD means much simpler and much faster conversion between internal representation and display. A lot of early microcomputers were used by small business. BCD is inferior for complicated scientific calculations, but is ideal for simple small business accounting, which was CBASICs target market. [1] http://en.wikipedia.org/wiki/CBASIC
[2] http://www.cpm.z80.de/manuals/cbasic-m.pdf
[3] http://en.wikipedia.org/wiki/IEEE_floating_point |