Floating Point Calculator
Convert decimal numbers to IEEE 754 binary representation. View sign, exponent, mantissa, and hex encoding for 32-bit and 64-bit floats.
IEEE 754 Floating-Point Format
Computers store fractional numbers as IEEE 754 binary floats. A 32-bit single-precision value splits into a sign bit, 8 exponent bits, and 23 fraction bits. A 64-bit double uses 11 exponent bits and 52 fraction bits. This tool converts your decimal input into both representations and shows the exact value stored after rounding.
Normal Number Formula
For 32-bit normal numbers:
$$(-1)^S \times 2^{E-127} \times (1.F)_2$$Where \(S\) is the sign bit, \(E\) is the exponent field, and \(F\) is the fractional mantissa. Subnormal, zero, infinity, and NaN cases use special exponent and fraction patterns defined in IEEE 754.
Related tools: Even Parity Calculator and ASCII Converter.
Frequently Asked Questions
Why does 0.1 not store exactly?
Decimal 0.1 has no finite binary fraction. The float stores the closest representable value, which introduces a tiny rounding error you can see in the error column.
What is the difference between float32 and float64?
Float64 has more mantissa bits, so it represents more decimal values accurately and handles a wider range with smaller relative error.
What does subnormal mean?
Subnormal numbers use exponent zero with a non-zero fraction. They fill the gap between zero and the smallest normal value.
Can floats represent infinity?
Yes. An exponent of all ones and a zero fraction encodes positive or negative infinity depending on the sign bit.
What is NaN?
Not a Number results from invalid operations like zero divided by zero. It has an all-ones exponent and a non-zero fraction.
Why show hexadecimal?
Hex is compact for 32 or 64 bits and matches how debuggers and hardware datasheets display float encodings.
Related Tools
Recent Visits
Finance Calc Kit
Focused calculators on Finance Calc Kit for loans, compounding investments, contractor tax estimates, and reti...
Explore Finance Calc Kit