Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Computer CPU Assember Instructions 6. Consider the following register and memory

ID: 3566626 • Letter: C

Question

Computer CPU Assember Instructions

6. Consider the following register and memory values:

Register

Contents

Memory Locations

Contents

1

150

110

310

2

252

111

004

3

250

112

212

4

311

113

017

PC

320

210

310

BR

308

211

313

X

002

212

008

AC

110

310

405

311

151

312

151

313

202

PC is the Program Counter, BR is a Base Register, X is an Index Register, AC is the Accumulator.

a. Compute the result of an ADD IMMEDIATE 210 instruction.


b. Compute the result of an ADD DIRECT 210 instruction.


c. Compute the result of an ADD INDIRECT 210 instruction.


d. Compute the result of an ADD INDEX 210 instruction.

Register

Contents

Memory Locations

Contents

1

150

110

310

2

252

111

004

3

250

112

212

4

311

113

017

PC

320

210

310

BR

308

211

313

X

002

212

008

AC

110

310

405

311

151

312

151

313

202

Explanation / Answer

a) Add immediate 210

Adds the content 210 to the accumulator and stores it in the accumulator

Therefore, Acc = 110+ 210 = 320

b) ADD DIRECT 210

Adds the content in address 210 to the accumulator and stores it in the accumulator

Therefore , Acc = 110 + 310 = 420

c) ADD INDIRECT 210

Adds the contents in register 210 to the accumulator. Since, there is no register 210, the reslt cannot be computed

d)ADD INDEX 210 instruction

Adds the content in the 210 address index to the accumulator

Therefore , Acc = 310 + 110 = 420

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote