Answer. Code for Three Operands. add $t0, $s1, $s2. add

Added on -2019-09-21

| 3 pages
| 597 words
| 359 views

Trusted by 2+ million users,
1000+ happy students everyday

Showing pages 1 to 1 of 3 pages

1.Answer a.Code for Three Operands add $t0, $s1, $s2 add $s0, $t0, $s3b.Code for Two Operandsadd $s0, $s1 add $s0, $s2add $s0, $s3Here s0 is A , s1 is B , s2 is C and s3 is D in first line s0 will get whatever is s1 , in second line s0 will be added with s2 and in last line s0 ( which have addition of s0+s1) will be added with s3 , so you will get all the added values of s1 , s2 and s3 in s0.Difference between 3-Operand Arithmetic instruction, is 2 operands will take extra time to calculate, and it is executing add instruction three times, however in 3 operands have to executeadd two times only.2.Answeri)$T0 = 1ii)Sorting of Arrays 3.Answer 4.Answer.text.globlmainmain:lw $s1, B # Load the word stored in label Baddiu $s0, $s1, -201 # here S0 is A and s1 is B.dataB:.word 210

Found this document preview useful?

You are reading a preview
Upload your documents to download
or
Become a Desklib member to get accesss

Students who viewed this