# Assume that variables f and g are given and could be considered 32-bit integers as declared in… 2 answers below »

1. Assume that variables f and g are given and could be considered 32-bit integers as declared in a C program. a. f = -g – f; b. f = g + (-f – 5); For the statements above, what is the corresponding MIPS assembly code? a. How many MIPS assembly instructions are needed to perform the above statements? b. If the variables f, g, h, i, and j have values 1, 2, 3, 4, and 5, respectively, what is the end value of f? 2. Assume that the variables f, g, h, I, and j are assigned to the registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the Array A and B are in registers $s6 and $s7, respectively. a. f = -g – A[4]; b. B[8] = A[i – j]; What is the corresponding MIPS assembly code? How many MIPS assembly instructions are needed to perform the code above? How many different registers are needed to carry out the statements above? 3. Given the signed numbers below a. 0010 0100 1001 0010 0100 1001 0010 0100two b. 0101 1111 1011 1110 0100 0000 0000 0000two What base 10 number does the binary numbers above represent, assuming that it is a two’s complement?

Attachments:

### Looking for a similar assignment? Get help from our qualified experts!

"Our Prices Start at $9.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!":

Order a Similar Paper Order a Different Paper