The Intel BCD opcodes are a set of six x86 instructions that operate with binary-coded decimal numbers.
In addition, the x87 part supports a unique 18-digit (ten-byte) BCD format that can be loaded into and stored from the floating point registers, from where ordinary FP computations can be performed.
[1] The integer BCD instructions are no longer supported in long mode.
BCD numbers are generally assumed to be stored in the lowest byte of a register, e.g. AL; operations on unpacked BCD numbers expect the least significant digit in the lowest byte of a register, e.g. AL, and the most significant digit in the second lowest byte, e.g. AH.
First the operands are converted to normal binary representation using aad (ASCII adjust before division): The processor converts numbers by multiplying the most significant byte by 10 and adding the least significant byte.
The quotient and remainder of the division are obtained as usual using div, and will be present in normal binary representation.
[2][3] The x87 coprocessor has BCD support in the form of a pair of load (FBLD) and store-and-pop (FBSTP) instructions.