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
- Subnormal numbers have exponent field 0 and no hidden leading 1.
- The exponent field of all ones means Infinity or NaN.
- 0.1 + 0.2 is not 0.3 because neither is stored exactly.
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.
Scientific Calculator with Steps
Type a whole expression and see the answer with each step in the order it was worked out.
OPEN →Matrix SolverDeterminant, inverse, rank, transpose, products and linear systems for small matrices.
OPEN →Laplace Transform TableStandard Laplace pairs and properties. Type part of a function like sin or e^ to filter.
OPEN →