retagged by
235 views
0 votes
0 votes

The following programme is stored in memory unit of the basic computer. What is the content of the accumulator after the execution of programme? 
(All locations numbers listed below are in hexa )

Location                          Instruction
210                                    CLA
211                                    ADD 217
212                                    INC
213                                    STA 217
214                                    LDA 218
215                                    CMA
216                                    AND 217
217                                    1234H
218                                    9CE2H 


Options Are: 

  1. 1002H
  1. 2011H
  1. 2022H
  1. 0215H
retagged by

1 Answer

1 votes
1 votes
The answer should be D.

CLA – clears the accumulator

ADD 217, Adds contents of location 217 with the Accumulator and stores in accumulator. Hence now contents of AC = 1234H

INC – increments acc (accumulator), hence value at 217 is 1234H + 1H = 1235H

STA 217 – store acc to location 217.

LDA 218 – load contents at 218 to acc. Hence acc = 9CE2H

CMA – complements the value at acc. Thus now acc =  631DH

AND 217 – performs bitwise AND of acc with contents of memory location 217 and stores the result in acc.

Thus acc = 1235H & 631DH which equates to 0215H

Hence the correct option is D.

Related questions

0 votes
0 votes
1 answer
1
Shoto asked Jan 14, 2022
434 views
Can anyone please solve this?
0 votes
0 votes
2 answers
2
rsansiya111 asked Dec 23, 2021
400 views
In designing a computer’s cache system,
2 votes
2 votes
1 answer
3