6. The MIPS registers S0= 10, S1 =20, S2=1, S3=30 and S4=40 (all decimal numbers). After executing the MIPS instruction addi $s2, $s3, 4 what is the contents of the registers. SO = S1= S2= S3= S4=
Added by Kathryn P.
Close
Step 1
Step 1: The MIPS instruction `addi $s2, $s3, 4` adds the immediate value 4 to the contents of register $s3 and stores the result in register $s2. Show more…
Show all steps
Your feedback will help us improve your experience
Aarya B and 81 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Aarya B.
Q2 [25 points] Consider the MIPS code given in the following. main: addi $sp,$sp,-4 sw $ra,0($sp) addi $a0,$0,2 sw $a0,4($s1) addi $a1,$0,3 sw $a1,8($s1) jal dofsum sw $v0,16($s1) lw $ra,0($sp) addi $sp,$sp,4 jr $ra dofsum: jal sum jr $ra sum: add $v0,$a0,$a1 jr $ra Draw the snapshot of the stack before, during, and after dofsum() function call. Assume $SP = 0x45ffff00 before dofsum() function call.
Akash M.
A. (5 points) Suppose the following instruction needs to work with the above set-up: And $s0, $s1, $s2 What are the values of all the seven control lines that are shown above in the figure? Control Line Name Control Line Value in Binary
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD