IEEE-754 Floating Point Converter
Encode any decimal number into its exact IEEE-754 single- or double-precision bit pattern and see the sign, exponent, and mantissa fields.
Precision
Value decoded back from the stored bits
How does this calculator work?
This converter encodes a decimal into its IEEE-754 bit pattern. It splits the word into a sign bit, exponent field, and mantissa, then reports the biased and unbiased exponents, the hex word, and the exact reconstructed value for both 32-bit single and 64-bit double precision, including zero, infinity, NaN, and subnormals.
Formula
How this is calculated
The decimal value you enter is written into a byte buffer using the platform DataView (setFloat32 for 32-bit single precision, setFloat64 for 64-bit double precision), then each byte is read back and expanded to its binary digits in big-endian order. The resulting bit string is sliced into three fields: 1 sign bit, then the exponent (8 bits for single, 11 bits for double), then the mantissa, or fraction (23 bits for single, 52 bits for double).
The exponent is stored with a bias so that it can represent both positive and negative powers without a separate sign: the bias is 127 for single precision and 1023 for double precision. The unbiased exponent is simply the stored exponent minus the bias. For normal numbers the actual value is (-1)^sign × 1.mantissa × 2^(storedExponent - bias), where the leading 1 is implicit and not stored.
Special cases are handled directly from the field patterns. An all-zero exponent with a zero mantissa is ±0; an all-zero exponent with a nonzero mantissa is a subnormal number whose effective exponent is 1 - bias and whose leading bit is 0 instead of 1. An all-ones exponent with a zero mantissa is ±Infinity, and an all-ones exponent with a nonzero mantissa is NaN. The reconstructed value is read straight back from the same bytes, so it shows exactly the nearest representable value, including any rounding that occurred during encoding.
Frequently asked questions
Most decimals cannot be represented exactly in binary floating point, so the encoder stores the nearest representable value. The reconstructed field shows that rounded value, which is what your computer actually works with.
The exponent is stored as a non-negative integer offset by a bias (127 for single, 1023 for double). This lets one unsigned field encode both large and small magnitudes; the true power of two is the stored exponent minus the bias.
Zero uses an all-zero exponent and mantissa. Infinity uses an all-ones exponent with a zero mantissa. NaN uses an all-ones exponent with a nonzero mantissa. Subnormals use an all-zero exponent with a nonzero mantissa and an implicit leading 0.
Also known as
TG we-Calculate Editorial Team. (2026). IEEE-754 Floating Point Converter [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/ieee-754-floating-point-converter
TG we-Calculate Editorial Team. "IEEE-754 Floating Point Converter." TG we-Calculate. 2026. https://we-calculate.com/calculator/ieee-754-floating-point-converter.
TG we-Calculate Editorial Team, "IEEE-754 Floating Point Converter," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/ieee-754-floating-point-converter
@misc{wecalculate_ieee_754_floating_point_converter, title = {IEEE-754 Floating Point Converter}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/ieee-754-floating-point-converter}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
