IEEE 754 Visualizer

See the sign, exponent and fraction bits of a 32-bit or 64-bit float, or decode bits you type in hex.

How it works

Type a number, or choose hex and type the raw bits. The tool shows the sign, exponent and fraction bits, what kind of value it is, and the exact decimal value that is really stored.

The formula

value = (-1)^sign x 1.fraction x 2^(exponent - bias)
Bias is 127 for 32-bit and 1023 for 64-bit.

Worked example

0.1 in 32-bit is 0x3DCCCCCD. It is stored as 0.100000001490116..., not exactly 0.1.

Good to know

Common questions

Why is 0.1 not exact?
Binary fractions only hit sums of powers of two. 0.1 needs an endless pattern, so it is rounded.
What is negative zero?
Zero with the sign bit set. It compares equal to 0 but divides to minus infinity.
How many NaN patterns exist?
Many. Any exponent of all ones with a non-zero fraction is a NaN.

More in Math, Science & Engineering.