Meeting
Live Q&A - Mysteries of the Ancients: Binary-Coded Decimal (BCD)
Clive "Max" Maxfield
24:28
Live Q&A with Clive "Max" Maxfield for the talk titled Mysteries of the Ancients: Binary-Coded Decimal (BCD)
Michael_Kirkhart
Score: 0 | 3 years ago | 1 reply
MaxTheMagnificentSpeaker
Score: 0 | 3 years ago | no reply
Hi Michael -- thanks for the kind words -- a lot of the early micros had different ways of handling BCD -- as you say, some had a DAA instruction, others actually offered BCD addition and subtraction operations, and some just gave a soft of half (nybble) carry flag you could use to sort things out yourself.
DuaneBenson
Score: 0 | 3 years ago | 1 reply
For some reason, two's complement has always baffled me. I get it now.
MaxTheMagnificentSpeaker
Score: 0 | 3 years ago | no reply
My work here is done LOL









Excellent talk on a subject I have dealt with in the past, but not with the same level of detail.
I remember working with an Intel 8042 microcontroller, and saw one of the instructions was DAA, or "decimal adjust accumulator after addition". It was meant to allow the programmer to add 2 packed BCD values using the regular binary ADD instruction, and then correct the result. Here is a WWW link describing this same instruction in the x86 instruction set:
https://www.righto.com/2023/01/understanding-x86s-decimal-adjust-after.html