IEEE 754 Single Decoder

Enter 8 hex digits to decode the IEEE 754 single-precision value.

How it is calculated

Enter exactly 8 hexadecimal digits, with or without a leading 0x, in any letter case. The tool reads them as 32 bits and splits them into sign (1 bit), exponent (8 bits, 0 to 255) and mantissa (23 bits). For a normal number, value = (−1)sign × (1 + mantissa ÷ 223) × 2exponent − 127. If the exponent is 0 the number is subnormal and uses mantissa ÷ 223 × 2−126 with no leading 1; this also covers 0 and −0. If the exponent is 255, a zero mantissa means Infinity (with the sign) and any other mantissa means NaN. Values are printed with up to 9 decimals or 9 significant digits, switching to exponent form for very small or very large magnitudes (for example 1.40129846 × 10⁻⁴⁵). The three fields are also listed as sign, exponent and mantissa numbers. Input that is not exactly 8 hex digits gives no result.

Worked example

Decode 0x40490FDB. In binary it is 0 10000000 10010010000111111011011. Sign = 0, so positive. Exponent = 128, so the power of two is 128 − 127 = 1. Mantissa = 4,788,187, so 1 + 4,788,187 ÷ 8,388,608 = 1.570796371. Multiply by 21: 3.141592741. The tool prints 3.141592741. This is the closest 32-bit float to π, and the extra digits after 3.14159 show the rounding that single precision cannot avoid.

Try this example →

Common mistakes

  • Entering fewer or more than 8 hex digits. A 32-bit value is exactly 8 digits, so a shorter number needs leading zeros (00000001, not 1); 10 digits, such as a 40-bit value, gives no result.
  • Entering a 64-bit double (16 hex digits) here. This decoder handles only single precision.
  • Forgetting byte order. If a dump shows the bytes in little-endian order, reverse them before typing: bytes DB 0F 49 40 are 40490FDB.
  • Expecting the printed digits to equal what you originally typed in your program. A float such as 0.1 is stored as the nearest representable value, so the decoder shows 3DCCCCCD as 0.100000001.
  • Reading a NaN or Infinity result as an error in the tool. 7F800000 is a valid Infinity pattern and 7FC00000 is a valid NaN; both come from an exponent of 255.

About this calculator

IEEE 754 single-precision is the 32-bit binary format almost every programming language uses for the float type. The bits break down into three fields: 1 sign bit, an 8-bit exponent stored with a bias of 127, and a 23-bit mantissa (fraction) representing the significant digits after an implied leading 1. The final value is (−1)^sign × 1.mantissa × 2^(exponent−127).

This decoder takes 8 hex digits — the raw bit pattern of a float — and splits them back into those three fields, then reconstructs the decimal value. It’s a everyday reference for software engineers and computer science students debugging serialization bugs, inspecting memory dumps, or learning why floating-point numbers round the way they do, as well as for embedded and low-level programmers who need to see exactly how a value is represented in hardware.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    A decoder is handy as a plausibility test on a memory dump. BF800000 decodes to -1, a tidy value, while 00000001 decodes to 1.40129846 × 10⁻⁴⁵, the smallest positive float. If a field you expected to hold a measurement shows up like that, the bytes were most likely an integer or a flag, not a float. Have you met a pattern that decoded to something odd? Post the hex and what you expected.

Popular calculators

All Calculators