Question

I AM POSTING MY QUESTION 3RD TIME . FIRST TWO TIMES I DIDNOT GET THE PROPER...

I AM POSTING MY QUESTION 3RD TIME . FIRST TWO TIMES I DIDNOT GET THE PROPER ANSWER. PLEASE DO ALL STEPS BY LABELING THE EACH STEP. THIS IS THE ASSIGNMENT IN WHICH THE EACH STEP SHOULD BE LABEL . I MEAN EVERY THING SHOULD BE WRITTEN WHAT WE HAVE DONE IN OUR PROGRAM THIS IS THE REQUIREMENT OF TEACHER , PLEASE DO IT PROPERLY  

1) MIPS to C. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively. MIPS Code:

sll $t0, $s0, 2

add $t0, $s6, $t0

sll $t1, $s1, 2

add $t1, $s7, $t1

lw $s0, 0($t0)

addi $t2, $t0, 4

lw $t0, 0($t2)

add $t0, $t0, $s0

sw $t0, 0($t1)

For the MIPS assembly instructions above, what is the corresponding C statement?

-PLEASE MAKE SURE THAT YOUR ANSWER IS CORRECT

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
I AM POSTING MY QUESTION 3RD TIME . FIRST TWO TIMES I DIDNOT GET THE PROPER...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The relative time ratings of exercises are shown in square brackets after each exercise number. On average, an exercise...

    The relative time ratings of exercises are shown in square brackets after each exercise number. On average, an exercise rated [10] will take you twice as long as one rated [5]. Sections of the text that should be read before attempting an exercise will be given in angled brackets; for example, <1.3> means you should have read Section 1.3, Under the Covers, to help you solve this exercise. 2.1 [5] For the following C statement, what is the corresponding MIPS...

  • Please comment the MIPS code to help me understand. Here is what the code accomplishes. Here...

    Please comment the MIPS code to help me understand. Here is what the code accomplishes. Here is the code, partially commented. .data Matrix: .word 41,45,5, 34,8, 15,16,23,44,48,12,32,18,47,22,8,22 .word 46,40,42,33,13,38,27,6, 29,25,18,40,47,22,26,14,3 .word 7, 48,35,9, 43,38,9, 49,28,25,42,5, 44,10,5, 38,14 .word 46,33,16,6, 13,20,31,1, 8, 17,1, 47,28,46,14,28,7 .word 32,2, 48,25,41,29,14,39,43,46,3, 39,32,49,41,28,46 .word 5, 43,2, 48,13,4, 33,41,32,19,9, 25,30,22,2, 9, 40 .word 14,47,22,18,47,3, 35,44,18,6, 33,22,11,6, 47,50,4 .word 28,34,20,30,18,27,38,5, 26,40,37,23,16,13,37,8,7 .word 48,38,39,12,10,39,23,20,21,20,33,16,24,21,25,3,46 .word 49,38,40,38,13,47,5, 13,4, 13,23,26,12,30,29,29, 3 .word 8, 20,10,13,31,7, 12,41,12,21,28,26,43,14,35,10,19 .word 49,33,25,26,24,29,46,22,7, 5, 15,41,10,31,19,41,27 .word 48,9,...

  • Please answer the following questions involving MIPS assembly code: A) For the C statement below, what...

    Please answer the following questions involving MIPS assembly code: A) For the C statement below, what is the corresponding MIPS assembly code? Assume f, g are stored in S1 and S2. f = g + (-f -5) B) For the C statement below, what is the corresponding MIPS assembly code? Assume i and j are assigned in registers S1 and S2 respectively and base of address of arrays A and B are in registers S6 and S7. B[8] = A[i...

  • 2.9 5 $2.2, 2.3> Translate the following C code to MIPS. Assume that the variables f,...

    2.9 5 $2.2, 2.3> Translate the following C code to MIPS. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively. Assume that the elements of the arrays A and B are 4-byte words: fAlBg

  • I only need answer to number 3 (on bottom) which was not answered on the last...

    I only need answer to number 3 (on bottom) which was not answered on the last one that was posted. li $s6,268500992 li $s3,3 li $s5,10 li $t0,10 sw $t0, 0($s6) sw $t0, 4($s6) sw $t0, 8($s6) sw $t0, 12($s6) sw $t0, 16($s6) sw $t0, 20($s6) sw $t0, 24($s6) sw $t0, 28($s6) li $t0,2 sw $t0, 32($s6) loop: sll $t1,$s3,2 add $t1,$t1,$s6 lw $t0,0($t1) bne $t0,$s5,exit addi $s3,$s3,1 j loop exit: Already answered.... Draw the memory and its contents starting...

  • im trying to complete mips program code about a calculator program that can calculate integer addition...

    im trying to complete mips program code about a calculator program that can calculate integer addition / subtraction written using the MIPS assembler. im having hard times to debug this. The input is given to the array of Formula char (base address $ s0) in the form of a formula. The null character (\ 0, ASCII code 0) is placed at the end. The calculation result is given to the register $ s1 and the overflow is ignored. For example,...

  • Assignment 3 Translate the following MIPS code to C. Assume that the variables f, g, h,...

    Assignment 3 Translate the following MIPS code to C. Assume that the variables f, g, h, i and j are assigned to registers Ss0, Ss1, Ss2, Ss3 and Ss4, respectively. Assume that the base address of the arrays A and B are in registers Ss6 and $s7, respectively. addi St0, Ss6, 4 add $t1, $s6, $0 #register $0 always holds 320s sw St1, 0(Sto) add Ss0, St1, Sto

  • 2 performance (30pt) You are the project lead at Micro Performance. The company wants you to select which option would...

    2 performance (30pt) You are the project lead at Micro Performance. The company wants you to select which option would be best for their new Micro Speed processor: Type Arithmetic 1 Branch Memory Clock Original Fast Clock Fast Mem Percent by inst. type 40% 20% 40% 1 2 4 1 1.8GHZ 3.6GH2 1.8GHz 1. Double clock speed (Arithmet io ond branch are twice as fast, mem is the same) 2. Clock the same, add a high nerformance bus and larger...

  • PLEASE WRITE CLEARLY AND SHOW ALL STEPS SO THAT I CAN UNDERSTAND IT. THANKS Convert the...

    PLEASE WRITE CLEARLY AND SHOW ALL STEPS SO THAT I CAN UNDERSTAND IT. THANKS Convert the following MIPS assembly code into machine language. Write the machine code in hexadecimal. add $t0, $s0, $s1 lw $t0, -10($t1) addi $s1, $0, -20

  • MIPS MIPS MIPS PLEASE INCLUDE COMMENTS AND OUTPUT Sort array using Bubble sort algorithm. 1) First...

    MIPS MIPS MIPS PLEASE INCLUDE COMMENTS AND OUTPUT Sort array using Bubble sort algorithm. 1) First ask the user how many elements of his/her array. 2) Then, read the integer array elements as input from the User. 3) Then, print out the array before the sorting 4) Apply Bubble sort algorithm on your array 5) Print out the array after the sorting 6) Print some welcome text to th user 7) Add comments to your code to describe how is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT