0% found this document useful (0 votes)
304 views8 pages

Hw1 Sum2013

This document outlines the homework assignment for a computer systems architecture course. It provides instructions for 10 problems related to topics like the Von Neumann cycle, MIPS instruction formats, integer representation, floating point representation, performance measurement, and software optimization. Students are instructed to show their work for full credit and not consult peers on the answers. The homework is worth a total of 100 points and is due by August 13th, 2012. It also includes a bonus problem worth 10 additional points.

Uploaded by

Dylan Erickson
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
304 views8 pages

Hw1 Sum2013

This document outlines the homework assignment for a computer systems architecture course. It provides instructions for 10 problems related to topics like the Von Neumann cycle, MIPS instruction formats, integer representation, floating point representation, performance measurement, and software optimization. Students are instructed to show their work for full credit and not consult peers on the answers. The homework is worth a total of 100 points and is due by August 13th, 2012. It also includes a bonus problem worth 10 additional points.

Uploaded by

Dylan Erickson
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

CS 152 Computer Systems Architecture Summer 2013

Homework 1 Due Tuesday, August 13th, 2012, EEE 11:59PM PDF


Name Student ID

IMPORTANT NOTES: 1. No late submissions. 2. Please show your work. Remember that bottom line answers without proper explanations are worth ZERO points. 3. Remember that you are solely responsible for the answers to the questions, therefore, please refrain from consulting with your class peers.

For Grading Purposes Only:

Q1 10

Q2 10

Q3 10

Q4 10

Q5 10

Q6 10

Q7 10

Q8 10

Q9 10

Q10 10

BONUS 10

Total Score 100

Problem 1 (10 points)


Draw the Von Neumann Cycle and explain the basic function carried out in each state. Explain clearly how a RISC cycle is obtained from the Von Neumann cycle.

Problem 2 (10 points)


Explain what is done in each of the RISC states for the 5 types of MIPS instructions represented with R, I, and J instruction formats.

Problem 3 (10 points)


In MIPS, the structure of its instructions is simplified. The way we implement complex instructions through the use of MIPS simplified instructions is to decompose complex instructions into multiple simpler MIPS ones. Show how MIPS can implement the instruction swap $rs, $rt, which swaps the contents of the registers $rs and $rt. Consider the case in which there is an available register that may be destroyed as well as the case in which no register exists. If the implementation of this instruction in hardware will increase the clock period of a single instruction by 10%, what percentage of swap operations in the instruction mix would justify implementing it in hardware?

Problem 4 (10 points)


a. b. Given two n-bit twos complement numbers, prove that an addition overflow occurs if and only if the carry into the most significant bit position and the carry out of the most significant bit position are different. Consider now the sign-magnitude representation. Define the meaning of overflow in this representation and suggest an overflow detection mechanism.

Problem 5 (10 points)


With x = (0101 0101)2 and y = (1110 1111)2 representing two's complement signed integers, perform the following operations showing all work: a. b. c. d. x+y xy x*y x/y

Problem 6 (10 points)


Given the bit pattern: 1010 1111 1010 1000 0000 0000 0000 1000 what does it represent, assuming that it is: a. a two's complement integer? b. an unsigned integer? c. a single precision IEEE standard floating point number? d. a MIPS instruction?

Problem 7 (10 points)


a. Convert the number 752 in base-9 representation into base 3 representation

752 nine = (
b.

) three

Represent the decimal number -1/3 in IEEE 754 floating-point binary representation (single and double precision).

Problem 8 (10 points)


Consider 2 machines, A and B on which the following measurements are made for a certain program P. A: Execution time of P: 5 sec Instructions Executed: 5.4 x 108 CPI: 1.8 Execution time of P: 6.4 sec Instructions executed: 115 x 106 CPI: 2.0 Find the execution rate (in Millions of Instructions per Second (MIPS)) for each machine. Find the clock cycle for each machine. Using the books definition of performance measure, which machine is faster and by how much.

B:

a. b. c.

Problem 9 (10 points)


Assume that a multiply instruction takes 12 cycles and accounts for 15% of the instructions in a typical program. Assume that 85% of the instructions require an average of 4 cycles for each instruction. What percentage of time does the CPU spend doing multiplication?

Problem 10 (10 points)


Software optimization can dramatically improve the performance of a computer system. Assume that a CPU can perform a multiplication operation in 9ns and an addition or a subtraction in 1ns. a. How long will it take for the CPU to calculate the result of following equation assuming that we only have 1 multiplier and 1 adder? x=a*b*c*d+a*e b. If possible, optimize the equation so that it takes less time. What is the best-case running time for the calculation of the equation? What if we have 2 multipliers and 1 adder?

BONUS QUESTION (10 points)


Provide the pseudocode for the addition of two natural numbers using only increment, decrement, and conditional looping instructions.

You might also like