Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following figure shows the placement of a bit field in register $t0. In the

ID: 2085392 • Letter: T

Question

The following figure shows the placement of a bit field in register $t0. In the following problems, you will be asked to write MIPS instructions to extract the bits "Field" from register $t0 shown in the figure and place them into register $t1 at the location indicated in the following table. The bits shown as "XXX" are to remain unchanged. Find the shortest sequence of MIPS instructions that extracts a field from $t0 for the constant values i = X and j = Y and places the field into $t1 in the format shown in the data table.

Explanation / Answer

#mips required program

.text

.globl main

# declare main as global function

# input roll number

li $t1, roll

# to get last two digits of roll

# number reverse the roll

# number using array and divide

# it with 10^11 now you will get

# last digit assign it to x

# divide the remaining digits with10^10

#you will have last but one digit. x and y are your I and j

# move to $t0 register, catch the idea

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote