IEEE 754 Float Analyzer for 32-bit Values – Free

The IEEE 754 float analyzer splits a single-precision value into its sign, exponent and fraction bits and names its class. Start from a decimal number or from a raw hex or binary pattern.

How to use the IEEE 754 Float Analyzer tool

  1. Set Input format to Number to analyze a decimal value, or to Hexadecimal or binary bits to analyze a raw 32-bit word.
  2. Enter the value in Number or bit pattern, such as -118.625, 7FA00000 or a 0b string of up to 32 digits.
  3. Select Inspect bits. Example analyzes -13.25.
  4. Read the seven result lines from Value down to Class, and select Copy to paste them into a bug report or notes.

What the IEEE 754 float analyzer reports

Each run returns seven lines, always in the same order, whichever input format you chose.

  • Value: the number the 32 bits encode, printed with double-precision digits.
  • Hex: the pattern as 8 hex digits.
  • Bits: all 32 bits, sign first.
  • Sign: 0 for positive, 1 for negative.
  • Exponent: the 8 stored exponent bits, still including the bias of 127.
  • Fraction: the 23 bits after the binary point.
  • Class: normal, subnormal, zero, infinity or NaN.

Decoding the fields by hand

For a normal number the value is (1 + fraction / 2^23) x 2^(exponent - 127), with the sign applied last. Take -118.625. The Exponent line reads 10000101, which is 133, so the power is 6. The Fraction line starts 1101101010, which makes the significand 1.853515625. 1.853515625 x 64 = 118.625, and Sign 1 makes it negative.

Value: -118.625
Hex: 0xC2ED4000
Bits: 11000010111011010100000000000000
Sign: 1
Exponent: 10000101
Fraction: 11011010100000000000000
Class: normal

The five classes and their bit patterns

The Class line follows the encoding rules of IEEE 754 binary32, and every 32-bit pattern falls into exactly one class.

  • normal: exponent field from 1 to 254. The significand has an implicit leading 1.
  • subnormal: exponent field 0 with a nonzero fraction. The leading bit is 0 and the power is fixed at -126. 00000001 is the smallest, about 1.4e-45.
  • zero: exponent and fraction all zero. 80000000 is negative zero and prints as -0.
  • infinity: exponent field 255 with a zero fraction, 7F800000 or FF800000.
  • NaN: exponent field 255 with any nonzero fraction. Quiet and signaling NaNs both get this label.

Using the analyzer to debug float behavior

Bit mode is useful at boundaries. 007FFFFF is the largest subnormal and 00800000 is the smallest normal, 1.1754943508222875e-38. Entering both shows the exponent field change from 00000000 to 00000001 while the value moves by a single step.

Number mode explains rounding surprises. Enter 16777217 and the Value line says 16777216 with an all-zero fraction, because 24 significant bits cannot hold the extra 1. Enter 0.1 and the Value line shows 0.10000000149011612, the float nearest to one tenth.

Frequently asked questions

What is the exponent bias in single precision?

127. The Exponent line shows the stored field, so subtract 127 to get the real power of two. A field of 01111111 means 2^0, 10000000 means 2^1, and 01111110 means 2^-1.

What is a subnormal float?

A value smaller than the smallest normal number, 2^-126. Its exponent field is zero and it has no implicit leading 1, so precision drops as it approaches zero. Subnormals, also called denormals, let results underflow gradually.

How do I tell a quiet NaN from a signaling NaN?

Look at the first bit of the Fraction line. On most platforms 1 means quiet, as in 7FC00000, and 0 with other fraction bits set means signaling, as in 7FA00000. The Class line reads NaN for both.

Does typing -nan set the sign bit?

No. In Number mode every NaN input becomes the positive quiet NaN 7FC00000. To inspect a negative NaN, switch to bit mode and enter FFC00000. The result then shows Sign 1 together with Class NaN.

Can it analyze a 64-bit double?

No. This page is fixed at 32 bits, and bit mode rejects more than 8 hex digits. Use the IEEE 754 Float64 Converter for doubles. It prints the same seven lines with an 11-bit exponent and a 52-bit fraction.

How is it related to the IEEE 754 Float32 Converter?

Both pages run the same binary32 routine and return identical lines for identical input. This guide concentrates on reading the fields and classes. The converter guide walks through turning a decimal number into bits.

Related tools