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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
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:Andrew User ID:Recitation 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 italwaystrueamong the 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 thatints are 32 bits wide,chars are 8 bits wide and that right shift is arithmetical on signed numbers and logicalon unsigned numbers.Ifx > ytheny<!=xIfx < 0thenx+1braceleftBiggXbracerightBiggIfx > 0thenx+1If(x >> 31) < 0thenxIf((x << 31) >> 31) < 0thenx & 1Ifx > ythen(unsigned)xyIf((unsigned char)x >> 1) < 64then(char)x22. 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...
View Full Document

Page1 / 12

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

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