Q60.Marks: +2.0UGC NET Paper 2: Computer Science 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).
Location
Instruction
210
CLA
211
ADD 217
212
INC
213
STA 217
214
LDA 218
215
CMA
216
AND 217
217
1234H
218
9CE2H
1.1002H
2.2011H
3.2022H
4.0215H✓ Correct
Solution
The correct answer is option 4.
Explanation
Location
Instruction
execution of program
210
CLA
Clear accumulator (set to 0)
211
ADD 217
Add contents of location 217 i.e 1234 h to accumulator
212
INC
Increment accumulator by 1 so accumulator contain 1235 H
213
STA 217
Store this value 1235 H at location 217
214
LDA 218
Load accumulator with the content of 218 so accumulator now has 9CE2 H
215
CMA
Complement (1’s complement) accumulator so accumulator now have 631D H
216
AND 217
Perform bitwise AND operation with the content of 217 i.e with 1235 H i.e and of 631D H & 1235 H which will be 0215 H