This paper addresses a topic that perplexes many first-year programming students: working with floating-point values. Throughout their primary and secondary schooling experiences, these students used real numbers in their STEM-related classes, where the number of digits is theoretically infinite and limited primarily via such concepts as significant digits. This changes in their first programming course, where an integer divided by another integer yields… an integer. Additionally, when computer-based floating-point values are stored or manipulated via computational expressions, the results sometimes differ from those found in mathematical reality. Whether such differences occur through rounding, truncation, or irrational representation, students need to be aware of why these differences occur as the first step towards providing correct results using an imperfect representation system. However, introducing the 64-bit version of the IEEE 754 Standard for Floating-Point Arithmetic to a group of “programming newbies” can be an overwhelming and overly technical approach.
To help students better comprehend the nature of floating-point representation, the authors have developed a new, theoretical data type: the “OneByteFloat”. While severely reducing both the range and precision of the values that can be represented, all 256 possible values of this data type can be printed out for comparison and examination, thereby making this representation schema more approachable for beginning programmers. As the values range from 0.03125 to 7.875, and the least significant mantissa bit involves a weight of only 1/64, students can more readily examine (a) how floating-point values are implemented as unequally distributed discrete values along the real number line, (b) how some values in base-10 (such as the fraction 1/10) cannot be converted to an exact base-2 representation, and (c) what would need to be changed in order for this data type to represent zero, incorporate negative numbers, and so forth. While it’s not expected that someone would want to use OneByteFloat as a data type in an actual program, it allows for meaningful discussions in class by making all of the values and concepts approachable.
The full paper will be available to logged in and registered conference attendees once the conference starts on June 21, 2026, and to all visitors after the conference ends on June 24, 2026