IEEE 754 Floating Point Converter
Convert a decimal number to its exact IEEE 754 binary representation (32-bit single or 64-bit double precision). Shows the sign / exponent / mantissa bit layout, the hexadecimal value, and a full breakdown including special-value detection (NaN, infinity, zero, subnormal).
Input
Accepts regular decimals plus Infinity, -Infinity and NaN.
Output
| Property | Value |
|---|---|
| No data yet | |
Guides
Convert any decimal number into its exact IEEE 754 binary representation and see precisely how computers store it. This tool shows the sign bit, exponent, and mantissa layout for both 32-bit single precision and 64-bit double precision, plus the hexadecimal encoding and a full bit-by-bit breakdown.
What is IEEE 754?
IEEE 754 is the standard that virtually every processor and programming language uses to represent floating point numbers. A number is stored in three parts:
- Sign (1 bit) — 0 for positive, 1 for negative.
- Exponent — a biased power of two (8 bits for single precision, 11 bits for double). The stored value is offset by a bias (127 for 32-bit, 1023 for 64-bit) so both positive and negative exponents fit in an unsigned field.
- Mantissa / fraction — the significant digits (23 bits for single, 52 bits for double). For normalized numbers an implicit leading
1.is assumed, giving one extra bit of precision for free.
The value works out to (-1)^sign × 1.mantissa × 2^(exponent − bias).
How to use the tool
- Type a decimal number — for example
3.14,-0,Infinity, orNaN. - Choose single (32-bit) or double (64-bit) precision.
- Read off the results instantly: the delineated binary string (
sign exponent mantissa), the hexadecimal value, and a breakdown table with the raw and bias-adjusted exponent, the significand, the detected value type, and the exact value actually stored after rounding.
The binary output is spaced to make the three fields obvious, e.g. 0 10000000 10010001111010111000011.
Special values
The converter detects and labels the edge cases the standard reserves:
- ±0 — all exponent and mantissa bits zero (positive and negative zero are distinct).
- Subnormal (denormalized) — a zero exponent with a non-zero mantissa, used for numbers too small to normalize.
- ±Infinity — the maximum exponent with a zero mantissa.
- NaN — the maximum exponent with a non-zero mantissa.
Why does 0.1 + 0.2 not equal 0.3?
Because 0.1 cannot be represented exactly in binary. Convert 0.1 with this tool and the "stored value" for single precision reads 0.10000000149011612 — the closest 32-bit float. The fraction 1/10 becomes a repeating binary expansion (0.0001100110011...), so it must be rounded to fit the mantissa. Small rounding errors in 0.1, 0.2, and 0.3 do not cancel out, and the sum lands a tiny distance away from 0.3. This is inherent to binary floating point, not a bug in any particular language.
Why is the exponent "biased"?
Storing the exponent as an unsigned value plus a fixed bias lets the same bit pattern comparison work for ordering floats, and avoids a separate sign bit for the exponent. Subtract the bias (127 or 1023) from the raw exponent to get the true power of two — the tool shows both.
Single vs double precision
Double precision uses 52 mantissa bits versus 23, so it represents far more decimal digits accurately (about 15–17 significant digits versus 6–7). JavaScript numbers, and most languages' default floating point type, are 64-bit doubles.
Privacy
All conversion happens locally in your browser using the platform's native DataView/ArrayBuffer — the exact same IEEE 754 machinery your CPU uses. Nothing you enter is sent anywhere.