The following program is stored in memory unit of the basic computer. What is…
2020
The following program is stored in memory unit of the basic computer. What is the content of the accumulator after the execution of program? (All location numbers listed below are in hexadecimal).

- A.
1002H
- B.
2011H
- C.
2022H
- D.
0215H
Attempted by 30 students.
Show answer & explanation
Correct answer: D
Solution: step-by-step execution and final result.
CLA clears the accumulator: AC = 0000H.
ADD 217 adds memory[217] = 1234H → AC = 1234H.
INC increments AC: AC = 1235H.
STA 217 stores AC into location 217: memory[217] = 1235H (overwrites 1234H).
LDA 218 loads memory[218] = 9CE2H into AC: AC = 9CE2H.
CMA complements AC: CMA(9CE2H) = 9CE2H XOR FFFFH = 631DH.
AND 217 performs bitwise AND with memory[217] = 1235H: 631DH AND 1235H = 0215H (nibble-wise: 6&1=0, 3&2=2, 1&3=1, D&5=5).
Final accumulator content: 0215H
A video solution is available for this question — log in and enroll to watch it.