Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN
HANELARITHMETIC INSTRUCTIONSDA Instruction
(cont’)
Summary of DA instruction¾After an ADD or ADDC instruction1.
If the lower nibble (4 bits) is greater than 9, or if AC=1, add 0110
to the lower 4 bits
2.If the upper nibble is greater than 9, or if CY=1, add 0110 to the upper 4 bits
Example:HEXBCD290010 1001+ 18+ 0001 1000410100 0001 AC=1+ 6+ 0110470100 0111Since AC=1 after the addition, ”DA A” will add 6 to the lower nibble. The final result is in BCD format.