Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A byte contains 8 bits. How many bits are in a word? The $a0 register is used to

ID: 3847850 • Letter: A

Question

A byte contains 8 bits. How many bits are in a word? The $a0 register is used to store a return address from a function call. T/F Write the following sequence of code into MIPS assembler: a = (a - b) + (c - d) Assume that a, b, c, d are stored in registers $s1-$s4. Write the following sequence of code into MIPS assembler: a = (a + 10) + (b + 20) + (c + 9) Assume that a, b, c are stored in registers $s1-$s4. Let's suppose we have a 40-year-old computer that has an instruction execution rate of one thousand instructions per second. How long would it take in days, hours, and minutes, to execute the same number of instructions that you derived for the 500 MHz machine? Which of the following MIPS functions are R-type? -add, -sub, -addi, -lw, -SW Which of the following MIPS functions are I-type? -add, -sub, -addi, -lw, -SW What is the Difference between program counter and instruction register?

Explanation / Answer

1.

A byte contains 8 bits.

1 byte= 8bits

1 word=4 bytes

Therefore,

1 word =4(8 bits)   

=32 bits

Therefore, a word contains 32 bits.

2.

False.

$a0 register is an argument register and it is not used to store a return adress from a function call but i it is used for passing up to four arguments to a function.$a0 register is an argument register used before calling the function with jal.

6.a

The R-type MIPS functions are

-add,

-sub.

6.b

The I-type MIPS functions are:

-addi,

-lw,

-sw.

$a0 register is an argument