Convert to MIPS | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren

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
1 Antwort
+ 1
What do you mean by "MIPS"? Do you mean the MIPS CPU 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