exam1-s07-sol

# exam1-s07-sol - 15-213 Introduction to Computer SystemsExam...

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

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-213 Introduction to Computer SystemsExam 1February 27, 2007Name:Model SolutionAndrew User ID:fpRecitation Section:•This is an open-book exam. Notes are permitted, but not computers.•Write your answer legibly in the space provided.•You have 80 minutes for this exam.IntegersFloating PointAssembly LanguageCalling ConventionsStructures and AlignmentOut-of-Order ExecutionProblemMaxScore110215315410510615Total7511. Integers (10 points)For each of the following propositions, write inallcomparisons that make it true amongthe four possibilities:<>==!=If none are guaranteed to hold, please indicate that explicitly by marking it with anX. Wehave filled in the first two for you as examples. Assume the variables are declared withint x,y;and initialized to some unknown values. You may assume thatint’s are 32 bits wide,char’s are 8 bits wide and that right shift is arithmetical on signed numbers and logicalon unsigned numbers.Ifx > ytheny<!=xIfx < 0thenx+1braceleftBiggXbracerightBiggIfx > 0thenx+1braceleftBigg!=bracerightBiggIf(x >> 31) < 0thenx<!=If((x << 31) >> 31) < 0thenx & 1>!=Ifx > ythen(unsigned)xbraceleftBigg!=bracerightBiggyIf((unsigned char)x >> 1) < 64then(char)xbraceleftBiggXbracerightBigg22. Floating Point (15 points)1. (10 pts) Fill in the blank entries in the following table. We assume an IEEE repre-sentation of floating point numbers with1sign bit,k= 3bits for the exponent andn= 4bits for the fractional value. This means the bias is23-1-1 = 3....
View Full Document

{[ snackBarMessage ]}

### Page1 / 10

exam1-s07-sol - 15-213 Introduction to Computer SystemsExam...

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

View Full Document
Ask a homework question - tutors are online