Topic 1c
Binary Fractions, Floating-point representation, and numerical "problems"
Learning Outcomes
By the end of this topic students should be able to:
- Convert a length 8 bit-string into its decimal/fractional equivalent assuming the first four bits store the integer, and the second four bits store the fraction.
- Explain how a computer stores decimal numbers in the floating-point format using [8 | 32] bits.
- Explain overflow errors.
- Explain truncation (round-off) errors.
- Discuss situations where inexactness of computer calculations matter and don't matter explaining the source of the inexactness.
Learning Materials
- Readings
- Fractions in binary - pp 54-56
- Floating point representation - pp 63-66
- Truncation Errors - pp 66-68
- Overflow Errors - pp 59-60
- Videos
- Crash Course Computing #4
- Note, we are only going to be dealing with the floating part at this time. That runs from roughly 5:50-6:45.
- https://www.youtube.com/watch?v=PZRI1IfStY0 (Why rounding errors occur in binary.)
- Crash Course Computing #4
Checking for Understanding
Answer the following questions from your textbook. The answers to all Q&E questions are in the back of your book in Appendix F.
- p56, #3
- p56, #4
- p56, #5 b and d
To really test your understanding
- p68, 1-3
- None of these are directly related to a learning outcome.
- BUT, the process of attempting these problems will help you with elements of other learning outcomes.
- Do NOT worry if you don't understand how to do these.
Additional Guidance
- If you are still struggling with the material in this topic, the following videos may help.
- Fractions in Binary
- Floating Point Representations
- Storage Errors
Further Information
- NA