1. Engineering
  2. Computer Science
  3. 2 translate the following code into mips code b 0...

Question: 2 translate the following code into mips code b 0...

Question details

2. Translate the following code into MIPS code.
       

B [0] = 5;

for (i = 1 ; i < 50 ; i = i + 2)

{

           

            B[i] =i + B[i-1];

}

Assume the compiler associates the variable i to the register $t0. Also, assume B is an array of integers and its address is stored at register $s1.   

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution