in CO and Architecture recategorized by
2,872 views
0 votes
0 votes

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).

$\begin{array}{cl} \text{Location} & \text{Instruction} \\ 210 & \text{CLA} \\ 211 & \text{ADD } 217 \\ 212 & \text{INC} \\ 213 & \text{STA } 217 \\ 214 & \text{LDA } 218 \\ 215 & \text{CMA} \\ 216 & \text{AND } 217 \\ 217 & 1234\text{H} \\ 218 & 9\text{CE}2\text{H} \end{array}$

  1. $1002\text{H}$
  2. $2011\text{H}$
  3. $2022\text{H}$
  4. $0215\text{H}$
in CO and Architecture recategorized by
2.9k views

1 Answer

1 vote
1 vote

210 CLA     // clear accumulator

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 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 and operation with content of 217 i.e with 1235 h  i.e and of 631D  h & 1235 h which will be                            0215 h

217 1234 H 

218 9CE2 H

Hence option 4 is right ans

Answer:

Related questions