What are the states of the Auxiliary Carry (AC) and Carry Flag (CY) after…
2017
What are the states of the Auxiliary Carry (AC) and Carry Flag (CY) after executing the following 8085 program?
MVI A, FFH
MVI B, 01H
MOV H, A
ADD B
- A.
AC = 0 and CY = 0
- B.
AC= 0 and CY=1
- C.
AC=1 and CY=0
- D.
AC=1 and CY=1
Attempted by 21 students.
Show answer & explanation
Correct answer: D
The program loads A = FFH and B = 01H, then adds B to A.
FFH + 01H = 100H, so the 8-bit result is 00H and the carry flag CY is set.
The lower nibble F + 1 also generates an auxiliary carry, so AC = 1 and CY = 1.