Use the register and memory values in the table below for this question. Assume
ID: 3907591 • Letter: U
Question
Use the register and memory values in the table below for this question. Assume a 32-bit machine. Assume each of the following questions starts from the table values; that is, DO NOT use value changes from one question as propagating into future parts of the question.
a) Give the values of R1, R2, and R3 after this instruction: sub R3, R2, R1
b) What values will be in R1 and R3 after this instruction is executed: load R3, 8(R1)
c) What values will be in the registers after this instruction is executed: addi R2, R3, #8
Register R1 R2 R3 R4 Value 12 16 20 24 Memory Location 12 16 20 24 Value 16 20 24 28Explanation / Answer
Result after instructions are-
a) sub R3, R2, R1 ; R3 = R2 - R1
R1 = 16, R2 = 20 and R3 = 4
b) load R3, 8(R1) ; R3 = R1+8
R1 = 16 and R3 = 24
c) addi R2, R3, #8 ; R2 = R3 + 8
R1 = 16, R2 = 32, R3 = 24 and R4 = 28
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.