Question: Exercise 2.25 In this exercise, you will explore 32-bit constants in MIPS. For the following problems, you will be using the binary data in the

Exercise 2.25 In this exercise, you will explore 32-bit constants in MIPS. For the following problems, you will be using the binary data in the table below.

a. 1010 1101 0001 0000 0000 0000 0000 0010two

b. 1111 1111 1111 1111 1111 1111 1111 1111two 2.25.1 [10] <2.10> Write the MIPS code that creates the 32-bit constants listed above and stores that value to register $t1 2.25.2 [5] <2.6, 2.10> If the current value of the PC is 0x00000000, can you use a single jump instruction to get to the PC address as shown in the table above?

2.25.3 [5] <2.6, 2.10> If the current value of the PC is 0x00000600, can you use a single branch instruction to get to the PC address as shown in the table above?

2.25.4 [5] <2.6, 2.10> If the current value of the PC is 0x00400600, can you use a single branch instruction to get to the PC address as shown in the table above?

2.25.5 [10] <2.10> If the immediate fi eld of a MIPS instruction was only 8 bits wide, write the MIPS code that creates the 32-bit constants listed above and stores that value to register $t1. Do not use the lui instruction.

For the following problems, you will be using the MIPS assembly code as listed in the table.

a. lui $t0, 0x1234 ori $t0, $t0, 0x5678

b. ori $t0, $t0, 0x5678 lui $t0, 0x1234 2.25.6 [5] <2.6, 2.10> What is the value of register $t0 after the sequence of code in the table above?
2.25.7 [5] <2.6, 2.10> Write C code that is equivalent to the assembly code in the table. Assume that the largest constant that you can load into a 32-bit integer is 16 bits.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Organization And Design Questions!