IEEE 754 Floating Point Binary Calculator
Convert decimal numbers to binary floating-point (and back) using single precision (32-bit) or double precision (64-bit).
Decimal → Binary Floating Point
Binary Floating Point → Decimal
Tip: You can press Enter inside either input to run the conversion quickly.
What this floating point binary calculator does
This calculator helps you inspect how real numbers are stored in computers using the IEEE 754 standard. You can convert a decimal input into its binary floating-point layout and also decode an existing bit pattern back into a decimal value. It supports both common formats:
- 32-bit float (single precision): 1 sign bit, 8 exponent bits, 23 fraction bits
- 64-bit float (double precision): 1 sign bit, 11 exponent bits, 52 fraction bits
Understanding the three parts: sign, exponent, and fraction
1) Sign bit
The sign bit tells whether the number is positive or negative.
A value of 0 means positive, and 1 means negative.
2) Exponent field
The exponent stores a biased exponent. Instead of storing the true exponent directly, IEEE 754 adds a bias: 127 for 32-bit and 1023 for 64-bit. This allows both positive and negative exponents using an unsigned field.
3) Fraction (mantissa/significand) field
The fraction stores the precision bits after the binary point. For normalized numbers, the leading 1 is implicit (not stored), which effectively gives one extra bit of precision.
Why decimal numbers often look “slightly off” in binary
Many decimal fractions cannot be represented exactly in binary. For example, 0.1 becomes a repeating binary fraction, just like 1/3 repeats in decimal. So your calculator might show a nearby representable value. That is expected and is one of the most important things to understand in numerical computing.
Special IEEE 754 values you can explore
- +0 and -0: distinct bit patterns, equal in many comparisons
- Subnormal numbers: very tiny values close to zero with reduced precision
- Infinity: result of overflow or division by zero in many contexts
- NaN (Not a Number): used for undefined results like 0/0
Practical uses
A floating point converter is useful for debugging numerical software, understanding rounding behavior, validating serialization protocols, reverse-engineering binary formats, and teaching computer architecture. If your scientific, financial, or graphics code has strange tiny errors, checking the raw bits is often the fastest way to diagnose what is happening.
Quick learning workflow
- Enter a decimal value (like
0.1) and convert to 32-bit. - Switch to 64-bit and compare how many fraction bits you gain.
- Paste a raw bit pattern from logs or files and decode it back to decimal.
- Test edge cases:
-0,Infinity,NaN, and tiny subnormals.
With repeated use, you’ll build an intuition for floating-point precision limits and numerical stability. That intuition is invaluable for data science, simulation, machine learning, and systems programming.