IEEE-754 Float32 Inspector

Dissect 32-bit floating-point sign, exponent, and mantissa bits

Inspect any 32-bit IEEE-754 float: see the exact stored value, the binary bit layout, the sign bit, the 8-bit biased exponent, and the 23-bit mantissa, plus its category (normal, subnormal, infinity, NaN). Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is the IEEE-754 single-precision format?

It is the 32-bit floating-point standard (binary32) used by most languages for the float type. It splits 32 bits into 1 sign bit, 8 exponent bits and 23 mantissa (fraction) bits.

The IEEE-754 single-precision format is how almost every computer stores a 32-bit floating-point number. This inspector takes any decimal you type, rounds it to the nearest representable float, and dissects the exact bits into sign, exponent and mantissa.

How it works

A binary32 value packs 32 bits into three fields. The first bit is the sign: 0 for positive, 1 for negative. The next 8 bits are the exponent, stored with a bias of 127 so the true exponent is the stored field minus 127. The final 23 bits are the mantissa, or fraction.

For a normal number the actual value is (-1)^sign × 1.fraction × 2^(exponent − 127), where the leading 1 before the fraction is implied and not stored. That hidden bit gives 24 bits of significand from only 23 stored. The tool obtains the true bit pattern by writing the value into a 32-bit float and reading the same memory back as a 32-bit unsigned integer, so the result reflects the CPU’s exact round-to-nearest-even conversion.

Special cases

exponent all zeros, mantissa zero      -> ±0
exponent all zeros, mantissa nonzero   -> subnormal (gradual underflow)
exponent all ones,  mantissa zero      -> ±Infinity
exponent all ones,  mantissa nonzero   -> NaN

Example

The value 0.15625 is exactly representable. Its bits are sign 0, exponent 01111100 (124, so unbiased −3), and mantissa 01000000000000000000000. That decodes as 1.25 × 2⁻³ = 0.15625, and the full pattern is 0x3E200000.

Why the Float32 inspector matters in practice

Debugging precision bugs

A classic floating-point surprise: two values that appear equal when printed are not equal when compared with === in code. This happens because the stored bit patterns differ by one or more ULPs (units in the last place) — a rounding artifact from different computation paths. Entering each value into the inspector shows the exact bit patterns, revealing whether they are truly identical or differ in the last mantissa bit.

Understanding 32-bit versus 64-bit tradeoffs

Most general-purpose programming uses 64-bit doubles (binary64), which hold about 15–17 significant decimal digits. But graphics, machine learning, and embedded systems frequently use 32-bit floats (binary32) to cut memory in half and speed up SIMD operations. The tradeoff is precision: binary32 has only about 7 significant decimal digits. The inspector makes this tradeoff concrete — enter a value like 16777217 (2²⁴ + 1) and see it round to 16777216 because the mantissa cannot represent it exactly at that scale.

Reading binary file formats

Network packets, image files (like 32-bit float EXR images in visual effects pipelines), scientific data formats (HDF5, NetCDF), and custom binary protocols often store values as IEEE-754 float32. Given a hex value from a hex editor — for example 0x41200000 — you can enter the decimal equivalent (10.0) to verify the encoding, or work backward from the bits by reading the inspector output.

Notable values to explore

InputWhat you see
0.1A repeating binary pattern — not stored exactly
0.15625Exact representation (power-of-two fraction)
1.0Exponent 127 (unbiased 0), mantissa all zeros
InfinityExponent all ones, mantissa zero
0All bits zero
16777217Rounds to 16777216 — shows precision limit

Tips and notes

Use this inspector to understand rounding error, to debug binary file formats, or to see why two decimals that look equal compare as different. Because 32-bit floats only hold about 7 significant decimal digits, the stored value line will reveal any rounding the moment you enter a number that cannot be represented exactly. All processing happens locally in your browser.