Reference no: EM133383269
Problem 1. For the following MIPS assembly instructions above, what is a corresponding C statement?
add f, g, h
add f, i, f
Problem 2. For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively.
B[8] = A[i-j]
Problem 3. Translate 0xabcdef12 into decimal. You may simply assume that it is an unsigned integer.
Problem 4. Assume $t0 holds the value 0x00101000. What is the value of $t2 after the following instructions?
slt $t2, $0, $t0
bne $t2, $0, ELSE
j DONE
ELSE: addi $t2, $t2, 2
DONE:
Problem 5. What decimal number does the bit pattern 0x0C000000 represent if it is a floating point number? Use the IEEE 754 standard. Explain in detail how you get your answer.