IEEE 754 Converter

Convert a decimal number to IEEE 754 single or double precision bits, hex, and stored value.

Technology and NetUpdated 2026-10-203 min read
IEEE 754 Converter
Accepts decimal notation, scientific notation, Infinity, and NaN.
Hexadecimal
...
Binary layout...
Sign...
Exponent field...
Significand...
Stored value...
Category...

What it does

IEEE 754 is the standard binary format behind most floating point numbers in modern software. It stores a number in three parts: a sign bit, an exponent field, and a fraction field. The exponent is biased so the format can represent very small and very large values without a separate sign for the exponent.

Single precision uses 32 bits and double precision uses 64 bits. The extra bits in double precision buy a wider exponent range and far more fraction precision. Many languages call these float and double, although the exact type names and sizes vary by platform.

The default value 12.375 is positive and equals 1.546875 x 2^3. Its exponent field is 3 + 127 = 130, and its fraction is .546875. The 32 bits are 0 10000010 10001100000000000000000, which groups into the hexadecimal word 0x41460000.

Not every decimal number has an exact binary form. The decimal 0.1 becomes 0.100000001490116... in single precision and a slightly different value in double precision. The calculator shows the value actually stored after rounding, not the decimal you typed.

The tool covers normal numbers, subnormals, signed zero, infinity, and NaN. It displays the raw layout, but it does not show memory byte order. A hex dump may reverse the bytes on little-endian hardware, so the word 0x41460000 can appear as 00 00 46 41 in memory.

How to use

  1. Enter a decimal number, including scientific notation if needed.
  2. Choose single or double precision.
  3. Read the hexadecimal word first for a compact representation.
  4. Check the binary layout to see the sign, exponent, and fraction fields.
  5. Compare the stored value with the number you entered to see the rounding.
  6. Use the category field to identify normal, subnormal, zero, infinity, or NaN results.

Formula

Normal value = (-1)^sign x 1.fraction x 2^(exponent field - bias). Single bias = 127. Double bias = 1023. Subnormal value = (-1)^sign x 0.fraction x 2^(1 - bias).
sign
0 for positive, 1 for negative.
fraction
Bits after the binary point in the significand.
exponent field
Stored exponent before the bias is removed.
bias
127 for single precision, 1023 for double precision.

A normal number has an implicit leading 1 before the fraction. A subnormal number has an exponent field of zero and an implicit leading 0. All exponent bits set means infinity when the fraction is zero and NaN when the fraction is nonzero. The sign bit still applies to zero and infinity.

Worked example

Example: 12.375 in single precision

The default value and single precision setting are already selected.

  1. The number is positive, so the sign bit is 0.
  2. 12.375 / 8 = 1.546875, so the unbiased exponent is 3.
  3. Add the single precision bias: 3 + 127 = 130, which is 10000010 in binary.
  4. The fraction is 0.546875. In binary it is .100011, followed by zeros to fill 23 bits.
  5. Combine the fields: 0 10000010 10001100000000000000000.
  6. Group the 32 bits into four hex digits each: 0100 0001 0100 0110 0000 0000 0000 0000, or 0x41460000.
  7. The stored value is 12.375, so no rounding occurred.

Reference table

Single precision examples
Decimal inputHex wordStored valueCategory
12.3750x4146000012.375Normal
0.10x3DCCCCCD0.100000001Normal
-2.50xC0200000-2.5Normal
3.141592650x40490FDB3.141592741Normal
167772170x4B80000016777216Normal

Limits

  • The tool shows the numeric layout, not the byte order used in memory or on the wire.
  • Single precision has about 7 significant decimal digits, so large integers and fine decimals can round.
  • The sign and payload of a NaN are not preserved through ordinary decimal input.
  • The converter does not handle decimal floating point, bfloat16, half precision, or extended precision formats.

Common mistakes

  • Assuming the hex word is the same as the byte sequence stored in memory on a little-endian machine.
  • Expecting 0.1 to be stored exactly when the format is binary.
  • Using single precision for money or identifiers that need exact decimal digits.
  • Reading the exponent field as the true exponent instead of subtracting the bias.
  • Treating a subnormal result as zero without checking the category.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is 0.1 in single precision?

The hex word is 0x3DCCCCCD and the stored value is 0.100000001. The exponent field is 123, or unbiased -4.

What is -2.5 in single precision?

The hex word is 0xC0200000, the sign is Negative, the exponent field is 128 (unbiased 1), and the significand is 1.25.

What happens to 16777217 in single precision?

It rounds to 16777216 and is stored as 0x4B800000. Single precision cannot represent every integer above 2^24.

Questions

What is IEEE 754?

A standard for binary floating point arithmetic. It defines how sign, exponent, fraction, rounding, infinity, and NaN are represented.

How many bits are in single and double precision?

Single precision uses 32 bits: 1 sign, 8 exponent, and 23 fraction. Double precision uses 64 bits: 1 sign, 11 exponent, and 52 fraction.

Why is the exponent biased?

The bias lets the format store negative exponents without a separate sign bit and leaves the all-zero and all-one patterns for subnormals and special values.

Why does 0.1 come back as 0.100000001?

0.1 has no finite binary expansion, so the nearest single precision value is slightly different. The display shows the stored value rounded to nine decimals.

What is a subnormal number?

A very small value with an exponent field of zero and no implicit leading 1. It trades precision for a gradual approach to zero.

Does this show little-endian bytes?

No. It shows the 32-bit or 64-bit word in numeric order. Byte order depends on the machine and how the value is serialized.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.