What will be contents of AL and status of CF in 8086 after the execution of the following instruction?
69. What will be contents of AL and status of CF in 8086 after the execution of the following instruction?
AL : 73
CL : 29
ADD AL, CL
DAA
CL : 29
ADD AL, CL
DAA
Step 1: Addition Operation
Perform hexadecimal addition: 73H + 29H = 9CH.
After ADD AL, CL, AL = 9CH, CF = 0, and AF = 0.
Step 2: Decimal Adjust (DAA) Logic
- Lower Nibble Check: The lower nibble (CH) is > 9. Therefore, add
06Hto AL.
9CH + 06H = A2H - Upper Nibble Check: The new upper nibble (AH) is > 9. Therefore, add
60Hto AL.
A2H + 60H = 102H
Step 3: Final Register State
The 8-bit register AL takes the lower two digits, and the overflow sets the carry flag.
AL = 02, CF = 1
Correct Option: 1. AL = 02, CF = 1
Further Reading:
GATE EC Previous Year Papers with Solutions