Question: 1. How to load decimal number 2 in register $a1? li $a1 2? 2. Complier decides the following: a$s0 b $s1 c $s2 d$s3 temp0

1. How to load decimal number 2 in register $a1?

li $a1 2?

2. Complier decides the following:

a$s0

b $s1

c $s2

d$s3

temp0 $t0

temp1 $t1

Please translate following code to assembly language:

d = b * b + 4 * a * c

Hint:

Temp0 = a * c

Temp0 = 4 * temp0

Temp1 = b * b

d = Temp0 + Temp1

_____________________________________________________

.data

.text

1. How to load decimal number 2 in register $a1? li $a1

.data .text #Tempo = a* c #Tempo = 4 * tempo #Temp 1 = b *b #d = tempo + temp1 mul $t0, $s0,$s2 mul $t0,$t0, 4 mul $t1, $81, $s1 add $s3, $t0,$t1

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 Databases Questions!