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

Question: 1 translate the following code into mips code bi ...

Question details

1. Translate the following code into MIPS code.

B[i + 10] = B[i -2] + 40;

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

a) Assume B is an array of integers (each integer takes 4 bytes). B's address
is stored at register $10. Also assume that the compiler associates the
variable i to the register $11.
b) Assume B is an array of characters (each character takes one byte). B's address
is stored at register $10. Also assume that the compiler associates the variable i to   the register $11.

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