Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1Learning Outcomes

In this course, we will expect that you should be able to translate between a number’s IEEE 754 Floating Point format and their decimal representation. We give some examples below.

In practice, you can and should use floating point converters. This web app gives a fantastic converter that you can and should use to explore numbers beyond those discussed below!

2Example 1: Floating Point to Decimal

3Example 2: Step size with limited precision

Because we have a fixed # of bits (precision), we cannot represent all numbers in a range. With floating point numbers, the exponent field informs our step size.

Bigger exponents mean bigger step sizes, and vice versa. This is actually the desired behavior: when we have super large numbers, fractional differences become infinitesimal. However, with tiny numbers, smaller step sizes are more valuable and our precision (as represented by the bits of the significand) must go towards representing differences.

4Example 3: Floating Point to Decimal

5Example 4: Decimal to Floating Point

6Example 5: Decimal to Floating Point

This exercise shows the limitations of accurate representation using the fixed-precision IEEE 754 standard. After all, fixed precision means we only have 32 bits, and binary representations sometimes fall short.