01. 

[ C Code ]


int a = b + c;


[ MIPS ]


let 'a' be $s0

let 'b' be $s1

let 'c' be $s2


add $s0, $s1. $s2



02.

[ C Code ]


int a = (g + h) - (i + j);


[ MIPS ]

add $t0 , g , h

add $t1 , i , j

sub $s1, $t0, $t1


03.

[ C Code ]

A[300] = h + A[300] ;


Actually you may do not need MIPS code except for special devices like WI-FI . Since we do not have to compile with low level language anymore, coding in MIPS is not required in our daily life even in workplaces. Highly recommend you to study and spend more times on high level languages such as Java programming, Python et cetera....

+ Recent posts