floating point to decimal calculator

Enter exactly 32 bits for single precision binary.

How this floating point to decimal calculator works

This calculator converts an IEEE 754 floating-point bit pattern into its decimal value. You can enter either a binary string or a hexadecimal value, choose 32-bit single precision or 64-bit double precision, and instantly see the decoded result.

It also explains what the bit fields mean: the sign bit, exponent field, and fraction (mantissa) field. That makes this tool useful not only for quick conversion, but also for learning floating-point internals and debugging low-level numeric issues.

IEEE 754 structure in plain language

1) Sign bit

The first bit indicates whether the number is positive (0) or negative (1).

2) Exponent

The exponent stores a biased power of two. For single precision, the exponent has 8 bits (bias 127). For double precision, it has 11 bits (bias 1023).

3) Fraction (mantissa)

The fraction stores the bits after the binary point. For normalized numbers, IEEE 754 assumes an implicit leading 1 before that fraction. Subnormal numbers do not use that implicit 1.

How to use the calculator

  • Select single (32-bit) or double (64-bit).
  • Choose binary or hexadecimal input.
  • Paste your bit pattern and click Convert to Decimal.
  • Review the decimal value and the decoded field breakdown.

Examples

Single precision example

Binary: 01000000101000000000000000000000
This decodes to 5.

Double precision example

Hex: 400921fb54442d18
This decodes to approximately 3.141592653589793 (pi).

Special values to know

  • Zero: exponent all zeros, fraction all zeros.
  • Subnormal: exponent all zeros, fraction not all zeros.
  • Infinity: exponent all ones, fraction all zeros.
  • NaN: exponent all ones, fraction not all zeros.

Why decimal output can look surprising

Many decimal values (like 0.1) do not have exact finite binary representations. So the stored floating-point number is the nearest representable binary value. When converted back to decimal with high precision, you may see a tiny rounding difference. That behavior is normal and expected in binary floating-point math.

When this tool is especially useful

  • Interpreting raw bytes from network packets or files.
  • Debugging embedded systems and firmware logs.
  • Understanding compiler output and CPU register dumps.
  • Teaching students how floating-point encoding works.

🔗 Related Calculators