Compiling a arithmetic code in C Using Registers

Problem: The compiler has a bug inside and it is not working. You have to its job to associate program variables with registers:

Solution:
f = (g + h) - (i + j)
add $t0, $s1, $s2 #gets g + h
add $t1 ,$s3, $s4 #gets i + j
sub $s0, $t0 , $t1 # gets (g + h) - (i +j)


8 comments :

  1. Now that you've explained it, it's more easy to understand and can be resolved using this codes. A glitch that fast essays can address now using your codes.

    ReplyDelete
  2. Thank yoou for posting informative post.Request to visit
    best andorid training in chenani

    ReplyDelete
  3. Very Nice Blog I like the way you explained these things. I’ve been looking for ways to improve my website and overall rankings.I hope your future article will help me further.Take SEO Training in Chennai to mould yourself.

    ReplyDelete

Follow Me

If you like our content, feel free to follow me to stay updated.

Subscribe

Enter your email address:

We hate spam as much as you do.

Upload Material

Got an exam, project, tutorial video, exercise, solutions, unsolved problem, question, solution manual? We are open to any coding material. Why not upload?

Upload

Copyright © 2012 - 2014 Java Problems  --  About  --  Attribution  --  Privacy Policy  --  Terms of Use  --  Contact