Question

Say that: Memory at 0x10000000 contains 0x80 Memory at 0x10000001 contains 0x00 Register $s0 contains 0x10000000...

Say that:

  • Memory at 0x10000000 contains 0x80
  • Memory at 0x10000001 contains 0x00
  • Register $s0 contains 0x10000000

Suppose that the MIPS machine runs the following instruction:

lh $t0,0($s0)
  1. What is the hexdecimal value in register $t0 afterwards if machine is little endian? 0x ______
  2. What is the hexdecimal value in register $t0 afterwards if machine is big endian? 0x ______

Please note MIPS register has 32bit, which means you need to fill in 8 hexadecimal digits in the blank because each hexidecimal digit is equivalent to 4 bits.

PLEASE do some explainations!!

Homework Answers

Answer #1

Consider the following MIPS instruction:

lh $t0,0($s0) ; LH - Loading Halfword. Load the 32 - bit sign-extended halfword into $t0 register.

Suppose that memory address 0x10000000 = 0x80

memory address 0x10000001 = 0x00

Register $s0 = 0x10000000

(i) If the MIPS machine is little endian, what will be the 8-digit hexadecimal value in $t0 register:

Answer: $t0 = 0x80000000

(i) If the MIPS machine is Big endian, what will be the 8-digit hexadecimal value in $t0 register:

Answer: $t0 = 0x00000080

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions