IEEE 754 Float Converter

See the sign, exponent and mantissa bits of a 32 or 64-bit float.

Your input

A number like 0.1, -2.5e10, NaN, Infinity, or hex bits like 0x3DCCCCCD.
64-bit float 0 01111111011 1001100110011001100110011001100110011001100110011010
Hex
0x3FB999999999999A
Sign bit
0 (positive)
Exponent (11 bits)
01111111011 = 1019 → 2^-4
Mantissa (52 bits)
1001100110011001100110011001100110011001100110011010
Kind
Normal number
Stored value, exactly
0.1000000000000000055511151231257827021181583404541015625
  • Value = (−1)^sign × 1.mantissa × 2^(exponent − bias). 0.1 has no finite binary form, so every computer stores a slightly different number, which is why 0.1 + 0.2 is not exactly 0.3.

What is an IEEE 754 float?

IEEE 754 is the standard way computers store decimal numbers such as 0.1 or 3.14. A 64-bit double uses 1 sign bit, 11 exponent bits and 52 mantissa bits. A 32-bit float uses 1, 8 and 23. The value is (-1)^sign × 1.mantissa × 2^(exponent minus bias).

Because the number is stored in binary, many everyday decimals cannot be represented exactly. 0.1 has no finite binary form, so the computer stores the nearest value it can. That is why 0.1 + 0.2 is not exactly 0.3. This tool shows the bits, the hex form and the exact decimal value stored, and can also read hex bits back into a number.

How to use the IEEE 754 Float Converter

  1. Type a number such as 0.1, or hex bits starting with 0x.
  2. Choose 32-bit float or 64-bit double.
  3. Read the sign, exponent and mantissa.
  4. Compare the stored value with what you typed.

Real situations

When people use the IEEE 754 Float Converter

  • 1

    Understand rounding errors

    See exactly what value is stored for 0.1 and how far it is from what you typed.

  • 2

    Debug binary data

    Read a 32-bit or 64-bit pattern from a file or network packet as a number.

  • 3

    Teach floating point

    Show students the sign, exponent and mantissa fields for any number, in 32-bit or 64-bit form.

  • 4

    Check special values

    See how zero, infinity, NaN and very small subnormal numbers are stored in each width.

FAQ

IEEE 754 Float Converter: questions answered

What is stored when I type 0.1?

As a 64-bit double, the hex is 0x3FB999999999999A and the exact value is 0.1000000000000000055511151231257827021181583404541015625. As a 32-bit float it is 0x3DCCCCCD, exactly 0.100000001490116119384765625.

Why is 0.1 + 0.2 not exactly 0.3?

Neither 0.1 nor 0.2 can be stored exactly in binary. Each is rounded to the nearest representable number, and the tiny errors add up to a result slightly different from the stored 0.3.

What are the sign, exponent and mantissa?

The sign bit says positive or negative. The exponent sets the power of 2. The mantissa holds the digits after the leading 1. For 1.0 as a 32-bit float, the bits are 0 01111111 00000000000000000000000, hex 0x3F800000.

How do I read hex bits as a number?

Type the hex starting with 0x, such as 0x3DCCCCCD, and choose the matching width. The tool shows which number those bits mean.

What is the difference between float and double?

A float has 32 bits and about seven decimal digits of precision. A double has 64 bits and about fifteen to sixteen. Doubles are the default number type in JavaScript.

What are NaN and infinity?

They are special patterns. Infinity has an all-ones exponent and a zero mantissa. NaN means "not a number" and has an all-ones exponent with a non-zero mantissa. You can type NaN or Infinity into the tool.

Is this IEEE 754 Float Converter free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way