Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the MIPS instructions that compute the equation $t 0 = $t 0 * 1 2 7 . 7 5 without using multiplication and division

Write the MIPS instructions that compute the equation $t0= $t0*127.75 without using multiplication and division instructions.
sll $t1, $t0,7 # $t1= $t0*128
sll $t2, $t0,6 # $t2= $t0*64
add $t1, $t1, $t2 # $t1= $t1+ $t2
sll $t2, $t0,5 # $t2= $t0*32
add $t1, $t1, $t2 # $t1= $t1+ $t2
sll $t2, $t0,4 # $t2= $t0*16
add $t1, $t1, $t2 # $t1= $t1+ $t2
sll $t2, $t0,3 # $t2= $t0*8
add $t1, $t1, $t2 # $t1= $t1+ $t2
sll $t2, $t0,2 # $t2= $t0*4
add $t1, $t1, $t2 # $t1= $t1+ $t2
sll $t2, $t0,1 # $t2= $t0*2
add $t1, $t1, $t2 # $t1= $t1+ $t2
add $t1, $t1, $t0 # $t1= $t1+ $t0($t1= $t0*127)
sll $t2, $t0,1 # $t2= $t0*2
add $t2, $t2, $t0 # $t2= $t2+ $t0($t2= $t0*3)
sra $t2, $t2,2 # $t2= $t2/4($t2= $t0*0.75)
add $t0, $t1, $t2 # $t0= $t1+ $t2($t0= $t0*127+ $t0*0.75)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

Define human resource management.

Answered: 1 week ago