0

Convert to MIPS

Can someone help me to convert this code to MIPS For (i=0;i<10;i++) X[i] = 2*X[i]; And also this one: For (i=0;i<10;i++) X[i] = X[i]+1;

24th Jan 2021, 12:12 PM
Saba
1 Respuesta
+ 1
What do you mean by "MIPS"? Do you mean the MIPS CPU architecture( https://en.wikipedia.org/wiki/MIPS_architecture )? The code would be the same since it is the same high level language. The c, c++ compiler would handle translating to the appropriate machine code instructions. The c, c++, and Java implementations for both are exactly the same except you'd need to use "for" instead of "For" obviously.
25th Jan 2021, 6:25 AM
Josh Greig
Josh Greig - avatar