Question: Mips assembly code a) Wrile MIPs assembly code that wi execute the folkowing C statement. Assume that the following registers are used to represent the

 Mips assembly code a) Wrile MIPs assembly code that wi execute

Mips assembly code

a) Wrile MIPs assembly code that wi execute the folkowing C statement. Assume that the following registers are used to represent the variables: a in register sgo, b in register ssl, and c a+ e 33 b) Replace the C code for by a set of equivalent MIPs instructions, using as few instructions as possible. Assume that his n register S8, and the staring addresses for arrays a and bare stored respectively. (c) Replace the C code for by a set of equivalent MIPs instructions, using as few instructions as possible, Assume that f and gate in register ti and St0 respectively, and the staring addresses for arrays A and B are stored in registers Sal and Sal. respectively (al Follow the instructions below CONSECUTI after each instruction write the value of destination register in decimal into the space provided. ori Ssl. Szeto, 2 ass sll $s2, $s1, 3 andi Ss3, $s2, 19 ASis3 sub $s4, $s3, $s2 Translate the following c statement into the corresponding MIPs code. Assume that the variables f and gare assigned to registers Ss0 and 5s and the base address of the arrays A and B are in register Ss6 and $s?, respectively. 3- Memory (a) How many locations of memory can you address with 16-bit address? is the length of (b) How many bits to address a 4-Mega-kocation memory, e., what are required the memory address

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!