3-2 Floating Point Formats

IEEE 754 Floating-Point Formats

This program displays the IEEE 754 single-precision and double-precision floating-point formats.

To run the demo:

  1. The float and double panels are independent of each other.
  2. Enter a floating-point number into the Value field and press the Decompose button.
  3. Or, enter the individual parts of the number and press the Show value button.
  4. Press the Enter key after typing a number to enter it into the field.
  5. The Exponent bits, Biased value, and Unbiased value fields are interrelated. Changing one automatically changes the other two.
  6. If you enter a reserved biased exponent number (0 and 255 for float, 0 and 2047 for double), the unbiased field will be disabled.
  7. You do not need to enter the leading exponent 0 bits nor the trailing fraction 0 bits.
  8. You can also enter into the Value field:
    • min, -min, max, -max for the minimum and maximum values of the type
    • inf or -inf for the infinity values of the type
    • nan for the Not-a-Number value of the type

The original Java Applets do not run in modern browsers, but you can download the Java code and run it locally on your desktop. Check back for JavaScript and Python versions - coming soon!


Download Demos in Java