Homework Assignment 1 - Kevin Burger`s Website

advertisement
CSE/EEE 230 Computer Organization and Assembly Language
Homework 1 (Work In-Class on Fri 26 Aug) :: 50 pts
1 Instructions
You may work in pairs with a partner on this assignment if you wish or you may work alone. If you work with a partner,
only submit one file to Blackboard with both of your names in it; you will each earn the same number of points. See §3 for
what to submit for grading and the deadline.
Unless otherwise specified, for all exercises for which the answer is a real number, round your answer to two digits after
the decimal point. For full credit, explain how you obtained the answers to each of your exercise solutions, i.e., just do not
type a number and call it quits.
2 Exercises
1. (4 pts) [Ref: §1.1 of the Ch. 1 lecture notes, where we discussed the differences between computer architecture and
computer organization]
(a) What is the instruction set of a processor architecture?
(b) Consider two different processor architectures X and Y. Briefly explain how the instruction sets of X and Y
compare (are they the same? do they differ?)
(c) Is the size—in bits or bytes—of an instruction part of the ISA?
2. (4 pts) [Ref: §1.3 of the Ch. 1 lecture notes]
(a) Assembly language consists of nothing but bits? True
False
(b) Machine language consists of nothing but bits? True
False
(c) What is the name of the software tool that translates assembly language code into machine language code?
3. (14 pts) [Ref: §1.4 of the Ch. 1 lecture notes]
(a) A file named foo is composed of 32,312,486 bytes. Rounding to two digits after the decimal point, what is the size
of this file in MB? Show your work.
(b) What is the size of this file in MiB?
(c) For the file size specified in MiB, how much larger or smaller—as a percentage relative to the file size in MB—is
this file. That is, if x is the size in MB and y is the size in MiB, the question is asking you to compute |y - x| ÷ x
and express the result as percentage, e.g., 11.22%.
4. (14 pts) [Ref: §1.6 of the Ch. 1 lecture notes, p. 8, the discussion of measuring time and frequency]
(a) The time to execute a specific function in a program is 64 μs. What is the equivalent amount of time expressed in
ms?
(b) In ns?
(c) The frequency of a crystal oscillator (an electronic device which can be used to generate a clock signal) is 2,133,
000,000 cycles per second. What is the clock frequency expressed in KHz? (d) In GHz?
5. (14 pts) [Ref: §1.6 Two Computer System Performance Metrics of the Ch. 1 lecture notes, pp. 6-7]
(a) The execution time of a program P on processor architecture X is denoted texec,X(P) in the lecture notes. It can be
approximately measured by capturing the current system time just before the program is run, then running the
program, and after the program stops, capturing the system time again. The difference in the two times is the
execution time. Suppose the first capture of the system time occurs on 26 Aug 2016 09:13:43.4352 and the second
capture on 26 Aug 2016 09:25.12.5678. What is the execution time of P, expressed in secs, to four digits after the
decimal point?
(b) In the notes, the performance of a program P on processor architecture X is denotes as perfX(P) in the lecture notes
and note on p. 6 that performance is inversely relational to execution time. What is the performance of P on X?
Write your answer in scientific notation with two digits after the decimal point. Do not forget the units.
(c) Suppose we measure texec,Y(P) = 643.9517 by running P on processor architecture Y. The equation for the relative
performance of program P on X and P on Y is given on p. 6. Calculate perfrel,X(P),Y(P). Note that the value for
relative performance does not have units.
(c) Kevin R. Burger :: Computer Science & Engineering :: Arizona State University
Page 1
CSE/EEE 230 Computer Organization and Assembly Language
Homework 1 (Work In-Class on Fri 26 Aug) :: 50 pts
3 Submission Instructions
Create a document using your favorite word processor and type your exercise solutions. At the top of the document, type
the your name, and your partner's name if you worked with someone else. Convert this document into Adobe PDF
format and name the PDF file 230-f16-h01-asurite.pdf, where asurite is your ASURITE user name (the name you use
to log in to Blackboard) If you worked with a partner, name your document 230-f16-h01-asurite1-asurite2.pdf, where
asurite1 and asurite2 are the ASURITE user names of both partners.
THERE WILL BE A 25% PENALTY FOR NOT SUBMITTING YOUR SOLUTION IN PDF FORMAT.
FURTHERMORE, IF YOU SUBMIT A DOCUMENT WHICH IS NOT IN PDF FORMAT AND THE
GRADER CANNOT OPEN THE DOCUMENT BECAUSE IT IS IN SOME WEIRD FORMAT, YOU
WILL BE GIVEN A SCORE OF 0 ON THE ASSIGNMENT.
To convert your document into PDF format, Microsoft Office versions 2008 and newer will export the document into PDF
format by selecting the proper menu item from the File menu. The same is true of Open Office and Libre Office.
Upload the PDF file to Blackboard using the homework submission link by the deadline which is 4:00am Wed 31 Aug.
Consult the online syllabus for the late and academic integrity policies.
(c) Kevin R. Burger :: Computer Science & Engineering :: Arizona State University
Page 2
Download