Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Integer and Floating-Point Representation

Status Draft outlineSection The Machine

Bits acquire meaning only through an agreed representation. That choice determines range, rounding, overflow, exceptional values, and comparison behavior.

Planned model

Let the reader edit a bit pattern and interpret it as unsigned, two’s-complement, fixed-point, and IEEE-754 data. Expose sign, exponent, fraction, rounding, and overflow.

Questions

  • Why is decimal money commonly represented with scaled integers?
  • When does wrapping, checked, saturating, or overflowing arithmetic fit?
  • Why are NaN, signed zero, and non-associativity operational concerns?

Exercise

Choose a representation for prices and quantities, including scale, maximum range, rounding policy, and overflow handling.