{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

20085eeM116C_1_Quiz1~solutions

# 20085eeM116C_1_Quiz1~solutions - EE116C Quiz 1 One sheet of...

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

EE116C Quiz 1 10/14/08 One sheet of paper (double sided, handwritten) allowed. Calculators allowed. Also MIPS reference sheet (detachable from front of your book) is also allowed. Allotted time: 1 hour Total points: 50 Q1 . Can a C integer float? 10 points (a) Can all int in C (for the MIPS Instruction Set) be converted to a single precision floating point number and back to integer without changing the value of the integer? Why or why not? Answer: No. Since int in C has 32 bits, while a single precision floating point number just has 24 bits to store the significand. When the bit number of the significand of an int in C is less than or equal to 24, the value of the integer won’t be changed; otherwise, the extra bits will be rounded. (b) Can an int in C (for the MIPS Instruction Set) be converted to a double precision floating point number and back to integer without changing the value of the integer? Why or why not? Answer: Yes. Since a double precision floating point number has 53 bits to store the significand.

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.

{[ snackBarMessage ]}