Assignment 10, due Apr 6
Part of
the homework for 22C:60 (CS:2630), Spring 2012
|
On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper at the start of class on the day indicated (usually Friday). Exceptions will be made only by advance arrangement (excepting "acts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist in 14 MLH for help). Never push homework under someone's door!
|_ _ _ _|_ _ _ _|_ _ _ _|_ _ _ _| |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_| |s| exp | mantissa |
If the exponent is greater than 00000, the mantissa should always be normalized in the range from 0.5 to just less than 1.0.
Each part is worth 0.2 points.
a) What is the approximate decimal equivalent of FFFF16 in this number system?
b) What is the exact decimal equivalent of 123416 in this number system?
c) What is the normalized binary representation of of 1 in this number system?
d) What is the normalized binary representation of of 1010 in this number system?
e) What is the normalized approximate binary representation of of 0.110 in this number system?
Background: Here is a floating-point representation that might have been of some small use on a 16-bit minicomputer. It is designed to make use of all of the advanced concepts typical of modern floating-point numbers
|_ _ _ _|_ _ _ _|_ _ _ _|_ _ _ _| |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_| |s| exp | mantissa |
The special exponent value 00000 also represents -15, but indicates that the mantissa is not normalized.
The special exponent value 11111 means not a number or infinity.
For normalized numbers, there is a hidden bit just to the left of the point, so the mantissa 00 0000 0000 = 1.0 and 10 0000 0000 = 1.5 (the hidden bit is always one as a consequence of normalization).
For non-normalized numbers, the hidden bit is zero, so 00 0000 0000 = 0.0 and 10 0000 0000 = 0.5.
Each part is worth 0.2 points.
a) What is the binary equivalent of 1.010 in this number system.
b) What is the binary representation of the largest non-infinite positive number in this system?
c) What is the approximate decimal equivalent of your answer to part a? (That was a typo, this should have asked about part b!)
d) What is the binary representation of the smallest non-zero positive number in this system?
e) What is the approximate decimal equivalent of your answer to part c? (That was a typo, this should have asked about part d!)