Question: QUESTION 7 [2 marks] Write the MIPS instructions for the following C code: F = 4N; Where F in Sso, and N in $s1 QUESTION

 QUESTION 7 [2 marks] Write the MIPS instructions for the following
C code: F = 4N; Where F in Sso, and N in
$s1 QUESTION 9 What is the decimal value of register So after
executing the following code? .text li $s1, 3 li $s2, 2 slt
$50, $s1,$s2 beq $50, $zero, L1 li $80,2 Ll: QUESTION 10 What

QUESTION 7 [2 marks] Write the MIPS instructions for the following C code: F = 4N; Where F in Sso, and N in $s1 QUESTION 9 What is the decimal value of register So after executing the following code? .text li $s1, 3 li $s2, 2 slt $50, $s1,$s2 beq $50, $zero, L1 li $80,2 Ll: QUESTION 10 What is the decimal value of register S0 after executing the following code? Consider that the value of variable g = 5 and variable h = 3 .data g_var: .word 5 h var: . word 3 . text lw $si, g_var lw $s2, h var sub $50, $s2, $s1 QUESTION 11 Assume the base address of an integer array A of words in register s7, Write the MIPS instructions to do the following [4 Marks) (1 Mark) Read from the memory the values of integer variables x and y (both are word size) and save them in 30 and si respectively. a b. (1 Mark) Read from the memory the value of A[O) and save it in s2. c. (2 Marks) Calculate and save the result in the memory for A[3] = x + y + A[0] QUESTION 15 What is the decimal value of register S2 after executing the following code? . text li $si, 3 li $2,0 Ll: bne $51, $zero, L2 addi $s2, $s2,3 addi $sl, $s1,-1 j L1 L2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!