Binary Coded Decimal Notable
Binary Coded Decimal Notable
(BCD)
Unpacked BCD
Example: 00000101 = 5
00001001 = 9
Example: 10010101 = 95
00111000 = 38
→ Convert to unpacked
→ If after SUB or SBB instruction/lower nibble greater than 9, or if AF= 1 subtract 0110
from lower 4 bits
→ Two commands
→If two unpacked BCD numbers are multiplied result can be converted back to BCD by AAM
→ Tag with 30h to get ASCII result AAM & AAD work only w/AX
ASCII addition & subtraction
→ ASCII numbers can be used for adding and subtraction the way
they are
THE END