Computer Science › Section B · Data storage › Topic B.7
Storing fractions: floating-point notation
To store a value such as 6.5 or 0.3125, a computer must record where the radix point goes as well as the digits. Floating-point notation does this, and its limits explain why 0.1 + 0.2 is not exactly 0.3 on almost every computer.
In this topic
- Storing where the point goes
- A small format to learn on
- Worked example: decoding a byte
- Normalised form
- Worked example: encoding 6.5
- Truncation error
- Values that never fit
- Order of addition matters
- Real formats: IEEE 754
- Common mistakes to avoid
- Key takeaways
This topic is part of Wuanberri Pro. Checking your access…
