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 R1, R2, R3 b) What values will be in R1 and R2 after this instruction is executed: lw R2, 8(R1) c) What values will be in R2 and R4 after this instruction is executed: addi R2, R4, 0x0020

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
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 R1, R2, R3
b) What values will be in R1 and R2 after this instruction is executed: lw R2, 8(R1)
c) What values will be in R2 and R4 after this instruction is executed: addi R2, R4, 0x0020

Register
R1
R2
R3
R4
Value
12
16
20
24
Memory Location
12
16
20
24
Value
12
20
24
40
Transcribed Image Text:Register R1 R2 R3 R4 Value 12 16 20 24 Memory Location 12 16 20 24 Value 12 20 24 40
Expert Solution
Step 1

a)

Give the values of R1, R2, and R3 after this instruction: 

sub R1, R2, R3

R1 = 12

R2 = 16

R3 = 20

sub R1, R2, R3 means R3-R2 will be stored in R1.

So, R3-R2 -> 20-16 = 4

After the instruction, R3 = 20, R2 = 16, R1= 4.

 

 

 

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education