News for hackers. Stuff that matters.
Re:Possible reasons for 8-bit bytes by pcwalton on Tuesday March 07, 2023 @08:36PM (#35064034)
BCD was popular for a long time for values that had to be constantly printed in decimal, since doing repeated division by 10 could be slow on systems that had no wide multiplication and no barrel shifter (remember that integer division by a constant is just a wide multiply and shift). By storing in BCD you can skip the division when you go to print the value out, at the cost of making arithmetic on the value a bit more expensive. Even some video games of the 16-bit era used BCD for stuff that had to be displayed in the UI.
Re:Possible reasons for 8-bit bytes by euroderf on Thursday March 09, 2023 @02:14PM (#35085317)
Knuth's MIX & MIXAL used a kind of BCD. A really strange design decision, perhaps a product of its time. A PITA to emulate.