Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions