代写代考 2. For this question you will be working with the following MIPS assembly p

2. For this question you will be working with the following MIPS assembly program
addi $3, $3,
addi $4. $4,
beq $0, $0, loop

Copyright By PowCoder代写 加微信 powcoder

(a) Write the machine code version of the program. The machine code instructions
should be written as hexadecimal values. The file should contain each 8-digit
hexadecimal number preceded by Ox (for a total of 10 characters) on a separate line.
The alphadigits in the hexadecimal values should all be uppercase. See the solution
for Question 3 of the practice problems for Lecture 14 for the expected format.
Submit the file aq2a.txt.
(b) Assume you have a processor running at 16GHz with the cycles per instruction set
architecture defined as follows:
Memory accesses: 10 cycles
• Branch/Jump accesses: 2 cycles
Everything else: 5 cycles
Assume that the program is run using the array front end and the user enters 4 for
the array size, and the numbers: [5, 6, 7, 8] for the array contents.
What is the CPI of the processor for the program given the input described?
How much time would the processor take to complete the program instructions?
Your answer should ignore the user time it takes to enter the data.
Show your work.
Submit the file a5q2b.pdf.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com