2000 Fall - Exam 1 with Solutions-2

2000 Fall - Exam 1 with Solutions-2 - Computer Science and...

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

View Full Document Right Arrow Icon
Computer Science and Engineering 331 Midterm Examination #1 Fall 2000 Name: __________ Solutions _______________________ S.S.#: _______________________________ 1 41 2 13 3 18 4 28 Total 100 Instructions: This exam contains 4 questions. It is closed book and notes. Calculators are allowed. Do all of your work on the attached sheets. You have 75 minutes to complete the exam. The exam totals 100 points; the points for each problem are indicated. The points have been assigned according to the for- mula 1 point = 1 1/3 exam minutes, so pace yourself accordingly. This exam counts for about 24% of your course grade.
Background image of page 1

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

View Full DocumentRight Arrow Icon
(41 pts) 1. Short Answer A. Give three advantages of programming in a higher level language (like C) over programming in assembler (like MIPS). 1 – Improves programmer productivity (fewer lines of code, easier to understand,…) 2 – Programs are machine independent - portability 3 – Programs are easier to debug and maintain Good compilers can produce very efficient code B. Label the remaining two states and show the transitions (by inserting arrows) for the finite state machine defining a machine instruction cycle: C. Give two reasons why registers are used as the source and destination operands for arithmetic instructions in the MIPS. 1 – Faster than accessing operands from main memory 2 – Improved code density – takes fewer bits in the instruction to specify the operand addresses Easier for a compiler to use Fetch Decode Execute
Background image of page 2
D. Show the memory state (contents given in hexidecimal) after executing the
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/02/2009 for the course CMPEN 331 taught by Professor Bhat during the Fall '08 term at Penn State.

Page1 / 9

2000 Fall - Exam 1 with Solutions-2 - Computer Science and...

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

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