InClassActivity02-sol

InClassActivity02-sol - 9/13/07 9:15 AM Activity #02...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
= 9/13/07 9:15 AM Activity #02 (SOLUTIONS) Last Name First Name Student ID Number 2.1 1.2 Total Grader Initials 50 points 50 points 100 points Activity 2.1 (F i rst h our) A. (35 points) Consider a simple CPU with just the instructions listed below Instruction Mnemonic Operation Number of Cycles Number of Bytes LDAA Load Accumulator from Memory 4 3 STAA Store Accumulator to Memory 4 3 ADDA Add Memory to Accumulator 4 3 BEQ Branch on Equal to 0 3 2 CMPA Compare accumulator to Memory 4 3 NEGA Negate Accumulator 2 1 BRA Branch always 3 2 MUL Multiply Accumulator 10 1 SUBA Subtract Memory from Accumulator 4 3 ANDA AND Accumulator with Memory 4 3 HALT Halt 1 1 NOP No Operation 1 1 a. (5 points) What is the average number of cycles per instruction (CPI) for this CPU, assuming that all instructions are executed equally often? Answer: 44 cycles 3.67 cycles / instruction 12 instructions Grading Policy: 5 pts correct answer, 2 pts partially correct answer, 0 pts for not trying. ECE-562 Computer Organization, Fall 2007 Page 1 of 6
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9/13/07 9:15 AM b. (5 points) If the CPU cycle time is 5ns, what is the average number of instructions executed per second, assuming that all instructions are executed equally often? Answer: Remember that 1ns = 10 -9 sec. It takes 3.67 × 5 × 10 -9 secs per instruction By taking the reciprocal, this translates to 54.5 × 10 6 instructions/sec, which is 54.5 MIPS . Grading Policy: 5 pts correct answer, 2 pts partially correct answer, 0 pts for not trying. c. (5 points) What would the highest "peak MIPS" that could be (misleadingly) claimed, and what operation would it use? MIPS. Answer: The most favorable assumption is that the machine executes only 1-cycle instructions such as NOPs all the time. This implies that it takes 5ns per instruction, which translates to 200 Grading Policy: 5 pts correct answer, 2 pts partially correct answer, 0 pts for not trying. d. (5 points) How long would it take to execute a program P with 10 million instructions executed equally often, and no I/O? State your answer in seconds.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

InClassActivity02-sol - 9/13/07 9:15 AM Activity #02...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online