Convert to MIPS | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answer
+ 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