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

The following memory with its content is given, assume R8 contains 5. a. What is

ID: 674171 • Letter: T

Question

The following memory with its content is given, assume R8 contains 5.

a. What is the contains of R10 after execution of the following instruction

LW R10, 0x02(R8) ; RX<---- MEM[ Ry + offset]

b. If the load instruction uses indirect addressing, what is the content of R10?

LW R10, @R8

Memory

Address Content

0             09

1             00

2            08

3             02

4             03

5            08

6            0A

7            1A

8            06

9            09

A           0F

B           2B

C          1C

D           14

E           23

F            45

Explanation / Answer

Answer:

a. Content of R10 after execution of instruction LW R10, 0x02(R8) :

given R8 contains 5, then

R10<---- MEM[ 0x02 + 5]

<---- MEM[0x07]

Ans: R10 <---- 1A

b. content of R10 after LW R10, @R8 :

given R8 contains 5, then

R10 <---- MEM[ R8 ]

<---- MEM[0x05]

Ans: R10 <---- 08