Floats Preparation
Overview
You probably noticed that we’ve been very focused on integers and have been ignoring the idea of “floating point” or “real” numbers, such as 3.3333 or 1/6. That’s because they are really hard to work with! Today, we’ll just scratch the surface regarding their representation.
Basic Learning Objectives
Before class, you should be able to:
- Explain the issue with representing real numbers in binary
- Describe the high-level idea of floating-point representation
- Summarize a historical example of a rounding error
Advanced Learning Objectives
After class, you should be able to:
- Identify the parts of a floating-point binary sequence
- Convert between floating point and binary
Resources
You should read the following in DIS:
Checks
Submit answers to the following on Moodle.
-
Given the hexadecimal number
0x40533333
, identify the sign, exponent, and mantissa/significand for these bits. Give your answer in hex or binary and indicate which it is. -
Convert that hexadecimal number
0x40533333
to decimal based on the IEEE standard 754. -
You can get additional practice with this calculator (and check your work, but I recommend doing it by hand first!)