Question: Assume variables a , b , and c are stored in registers $t 0 , $t 1 , and $t 2 respectively and are 3

Assume variables a, b, and c are stored in registers $t0, $t1, and $t2 respectively and are 32-bits non-
zero positive integer. Base address of d is stored in register $s0. Do not use multiply and divide
instruction (hint: use shift left logical (sll) for multiplication and shift right logical (srl) for division).
a). if(b<= c)d[b]=a/4
else d[b]= a + b 2
b). for(i=0;i0){
d[i]= d[a]+4*i;
i++;
}

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