Specify the contents of the accumulator and the status of the S, Z and CY…
2014
Specify the contents of the accumulator and the status of the S, Z and CY flags when 8085 microprocessor performs addition of 87 H and 79 H.
- A.
11, 1, 1, 1
- B.
10, 0, 1, 0
- C.
01, 1, 0, 0
- D.
00, 0, 1, 1
Attempted by 77 students.
Show answer & explanation
Correct answer: D
Solution: step-by-step calculation and flags.
Add the two hex values: 87H + 79H = 100H.
Accumulator (8-bit result): take the low 8 bits of 100H, which is 00H.
Sign flag (S): 0, because the MSB of the result 00H is 0.
Zero flag (Z): 1, because the 8-bit result is 00H.
Carry flag (CY): 1, because the sum produced a carry out (100H > FFH).
Final answer: Accumulator = 00H; S = 0; Z = 1; CY = 1.