Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the MIPS assembly code for the following C instructions: B[2j] = A[3] + A[21] + A[41] - #3 Assume i and j are
Write the MIPS assembly code for the following C instructions: B[2j] = A[3] + A[21] + A[41] - #3 Assume i and j are preloaded into $s0 and $s1 respectively. Base address of arrays A and B are preloaded into $s2 and $s3 respectively. Obtain the address and data of B[2j] for the instruction if: $S0 = 1 $s1 = 20 $s2 = 8000 $s3 = 4000. Note: Address is 32-bit => the MSB after 16 bit address shown are all zeroes. Data size is 8-bit for each address location but in the table we have each address corresponds to 4 address location to make it 32-bit size data. We also padded zeroes to the MSB of data. Assume data in the table is in hexadecimal. 8000 11 8004 AB 8008 2C 8012 1D 8016 11 8020 AB 8024 2C 8028 1D 8032 11 8036 AB 8040 2C 8044 1D 8048 11 8052 AB 8056 2C 8060 1D 8064 11 8068 AB 8072 20 8076 1D 8080 11
Step by Step Solution
There are 3 Steps involved in it
Step: 1
MIPS assembly instructions LW Load word This instruction load the value from the effective address o...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started