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

Added on - 21 Sep 2019

  • 3

    Pages

  • 597

    Words

  • 86

    Views

  • 0

    Downloads

Trusted by +2 million users,
assist thousands of students everyday
Showing pages 1 to 1 of 3 pages
1.Answera.Code for Three Operandsadd $t0, $s1, $s2add $s0, $t0, $s3b.Code for Two Operandsadd $s0, $s1add $s0, $s2add $s0, $s3Here s0 is A , s1 is B , s2 is C and s3 is Din 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 tocalculate, and it is executing add instruction three times, however in 3 operands have to executeadd two times only.2.Answeri)$T0 = 1ii)Sorting of Arrays3.Answer4.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
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Download This Document