The bit representation of a floating-point number is divided into three fields to encode these values:

  • The single sign bit directly encodes the sign of the number.
  • The -bit exponent field encodes the exponent .
  • The -bit fraction field encodes the significand/mantissa , but the value encoded also depends on whether or not the exponent field equals 0.

The actual floating-point number represented is:

Single-precision floating-point

In single-precision floating-point values (32-bit), there are bits for the exponent field and bits for the mantissa / fraction field.

In cases where a computation fails, we might end up with special values: