After binary addition of two BCD bytes:
; Add two 4-digit packed BCD numbers (result in DX:AX) ; Input: BCD1 = 0x1234 in DX, BCD2 = 0x5678 in BX ; Output: sum = 0x6912 (1234+5678=6912) bcd commands
Decimal arithmetic is natural for humans but unnatural for digital computers, which operate in binary. When binary floating-point numbers represent decimal fractions (e.g., 0.1), rounding errors inevitably occur. BCD solves this by storing each decimal digit separately, ensuring exact decimal arithmetic. BCD commands refer to processor instructions specifically designed to manipulate, adjust, or convert BCD data. After binary addition of two BCD bytes: ;
If you are setting up a dual-boot system (e.g., adding a legacy Windows version): Input: BCD1 = 0x1234 in DX