Consider a hypothetical computer architecture with a hypothetical assembly language. It has 32-bit registers (named r0, r1, etc) and 32-bit pointers. Its memory consists of 8-bit cells. It has (at least) the following instructions: • lw addr, reg - read a 32-bit value from memory address addr and store it in the named register • sw addr, reg - store the 32-bit value in the register into memory address addr •mov reg, imm- store the immediate value into the register Consider the following code written in this assembly language: mov r3, 0x19fab0c0 SW 0x200, r3 1w 0x200, r5 SW 0x202, r3 1w 0x200, r4 ; write the value in r3 to address 200 ; and read it from 200, into register r5 ; note! we write to address 202, not 200 ; read the 32-bit value at address 200, into r4 Answer the following questions about the value of registers after the above program executes. Give each answer as a single 32-bit number in hex. If the answer cannot be determined from the data given state why. (a) What value would you expect to find in register r5, if this is a big-endian architecture? Explain your answer. (b) What value would you expect to find in register r5, if this is a little-endian architecture? Explain your answer. (c) What value would you expect to find in register r4, if this is a big-endian architecture? Explain your answer. (d) What value would you expect to find in register r4, if this is a little-endian architecture? Explain your answer.
Consider a hypothetical computer architecture with a hypothetical assembly language. It has 32-bit registers (named r0, r1, etc) and 32-bit pointers. Its memory consists of 8-bit cells. It has (at least) the following instructions: • lw addr, reg - read a 32-bit value from memory address addr and store it in the named register • sw addr, reg - store the 32-bit value in the register into memory address addr •mov reg, imm- store the immediate value into the register Consider the following code written in this assembly language: mov r3, 0x19fab0c0 SW 0x200, r3 1w 0x200, r5 SW 0x202, r3 1w 0x200, r4 ; write the value in r3 to address 200 ; and read it from 200, into register r5 ; note! we write to address 202, not 200 ; read the 32-bit value at address 200, into r4 Answer the following questions about the value of registers after the above program executes. Give each answer as a single 32-bit number in hex. If the answer cannot be determined from the data given state why. (a) What value would you expect to find in register r5, if this is a big-endian architecture? Explain your answer. (b) What value would you expect to find in register r5, if this is a little-endian architecture? Explain your answer. (c) What value would you expect to find in register r4, if this is a big-endian architecture? Explain your answer. (d) What value would you expect to find in register r4, if this is a little-endian architecture? Explain your answer.
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
Related questions
Topic Video
Question
Computer Science

Transcribed Image Text:Consider a hypothetical computer architecture with a hypothetical assembly language. It has 32-bit
registers (named r0, r1, etc) and 32-bit pointers. Its memory consists of 8-bit cells. It has (at least)
the following instructions:
• lw addr, reg - read a 32-bit value from memory address addr and store it in the named register
• sw addr, reg - store the 32-bit value in the register into memory address addr
mov reg, imm- store the immediate value into the register
Consider the following code written in this assembly language:
mov r3, 0x19fab0c0
SW
1w
SW
1w
0x200, r3 ; write the value in r3 to address 200
0x200, r5
; and read
it from 200, into register r5
0x202, r3
; note! we write to address 202, not 200
0x200, r4
; read the 32-bit value at address 200, into r4
Answer the following questions about the value of registers after the above program executes. Give
each answer as a single 32-bit number in hex. If the answer cannot be determined from the data given
state why.
(a) What value would you expect to find in register r5, if this is a big-endian architecture? Explain
your answer.
(b) What value would you expect to find in register r5, if this is a little-endian architecture? Explain
your answer.
(c) What value would you expect to find in register r4, if this is a big-endian architecture? Explain
your answer.
(d) What value would you expect to find in register r4, if this is a little-endian architecture? Explain
your answer.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps

Knowledge Booster
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.Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education