The following program is stored in the memory unit of the basic computer. Give…
2019
The following program is stored in the memory unit of the basic computer. Give the content of accumulator register in hexadecimal after the execution of the program.

- A.
A1B4 - B.
81B4 - C.
A184 - D.
8184
Attempted by 42 students.
Show answer & explanation
Correct answer: D
Solution:
Execute CLA at location 010: accumulator becomes 0000.
Execute ADD 016 at location 011: add the word at 016 (C1A5) to accumulator: accumulator = 0000 + C1A5 = C1A5.
Execute BUN 014 at location 012: branch to location 014.
Execute AND 017 at location 014: perform bitwise AND of C1A5 and 93C6.
Compute nibblewise: C & 9 = 8, 1 & 3 = 1, A & C = 8, 5 & 6 = 4.
Result of AND is 8184, so accumulator = 8184.
Execute BUN 013 at location 015 to jump to 013, then execute HLT at 013 to stop.
Final accumulator (hex): 8184
A video solution is available for this question — log in and enroll to watch it.