IEEE 754 Floating-Point Converter

Convert decimal values to IEEE 754 binary32 (32-bit float) or binary64 (64-bit double), or decode an IEEE 754 bit pattern into a decimal value. Inspect the sign, biased exponent, fraction, complete binary representation, and hexadecimal encoding.

IEEE 754 Calculator

Enter a decimal number, such as 3.14, -0.5, 1e-10, Infinity, -Infinity, or NaN.

Conversion result

IEEE 754 bit fields

■ Sign bit ■ Exponent ■ Fraction
Decimal value
Hexadecimal representation
Sign bit
Exponent bits
Stored exponent (unsigned)
Exponent bias
Fraction bits
Classification

How the value is represented

    Quick examples:

    What Is IEEE 754?

    IEEE 754 is a widely used standard for representing and calculating floating-point numbers. Binary32 uses 32 bits, while binary64 uses 64 bits. Each representation contains a sign bit, an exponent field, and a fraction field. NIST's numerical methods reference describes these binary interchange formats.

    PropertyBinary32Binary64
    Total bits3264
    Sign bits11
    Exponent bits811
    Fraction bits2352
    Exponent bias1271023
    Significand precision24 binary digits53 binary digits

    1. Sign bit

    The first bit identifies the sign. A sign bit of 0 means positive or positive zero; a sign bit of 1 means negative or negative zero.

    2. Exponent field

    For normal finite values, the exponent is stored with a bias. Subtract 127 for binary32 or 1023 for binary64 to obtain the actual exponent. All-zero and all-one exponent fields have special meanings for zero, subnormal numbers, infinity, and NaN.

    3. Fraction field

    For normal numbers, the fraction field stores the bits after an implicit leading 1 in the significand. Subnormal numbers use an implicit leading 0 instead. The exponent and fraction together determine the represented magnitude.

    IEEE 754 conversion formula

    For a normal finite value:

    Value = (−1)sign × (1 + fraction) × 2stored exponent − bias

    For subnormal values, the leading significand bit is 0 and the exponent is fixed at 1 − bias.

    Why can the converted number differ from the input?

    Many decimal fractions cannot be represented exactly with a finite number of binary fraction bits. For example, 0.1 is repeating in binary. The converter shows the value represented by the selected format, which can differ slightly from the original decimal input.

    What are infinity, NaN, and subnormal values?

    Frequently Asked Questions

    What is the difference between binary32 and binary64?

    Binary32 has 32 total bits, an 8-bit exponent, and a 23-bit fraction. Binary64 has 64 total bits, an 11-bit exponent, and a 52-bit fraction. Binary64 generally provides greater precision and a wider range.

    Can I convert IEEE 754 bits back into a decimal number?

    Yes. Select “IEEE 754 bits to decimal,” choose the correct format, and enter exactly 32 or 64 binary digits. The tool decodes the sign, exponent, and fraction fields.

    Why does 0.1 have a long binary representation?

    The decimal fraction 0.1 has no finite binary expansion. The floating-point format stores a nearby representable value, so displaying the full decoded value may reveal a small difference.

    Does this tool send my numbers to a server?

    No. The conversion is performed in your browser using JavaScript. The PHP page provides the HTML and page metadata.

    Related Binarios.org Tools