EN
My tools

IEEE 754 Floating-Point Converter

Convert decimals to IEEE 754 half, single and double precision and back: hex and binary bits, exponent, mantissa, exact stored value and rounding error.

A decimal (1.5e-3), a fraction (1/3), inf or nan, or a C hex float (0x1.8p3). In the bit modes, the hex or binary pattern.
Hexadecimal
0x3DCCCCCD
binary32
Binary (sign exponent mantissa)
0 01111011 10011001100110011001101
Stored value (exact)
0.100000001490116119384765625
Shortest round-trip decimal
0.1
the shortest number that converts back to these bits
Type
Normal number
Sign bit
0
positive
Exponent field
01111011 = 123
biased by 127
Actual exponent
-4
123 − 127
Mantissa field
10011001100110011001101 (0x4CCCCD)
Significand
1.60000002384185791015625
1.mantissa in decimal; value = ± significand × 2^-4
Gap to the next value (ULP)
7.45058e-9
2^-27
Rounding error
0.000000001490116119384765625
stored − entered
Relative error
1.490e-8
The same number in each format
FormatHexStored value (shortest)Rounding error
binary160x2E660.1-2.441e-5
binary32 (selected)0x3DCCCCCD0.11.490e-9
binary640x3FB999999999999A0.15.551e-18
Format layout
FormatSignExponent bitsMantissa bitsBiasLargest finiteSmallest normalSmallest subnormal
binary16 (half)151015655046.10352e-55.96046e-8
binary32 (single)18231273.40282e+381.17549e-381.40130e-45
binary64 (double)1115210231.79769e+3082.22507e-3084.94066e-324
My tools →
Advertisement

Computers store most non-integer numbers in IEEE 754 binary floating point, which cannot represent 0.1 or 1/3 exactly. This converter shows the exact bits a number becomes in half (16-bit), single (32-bit float) and double (64-bit double) precision, splits them into sign, exponent and mantissa, and prints the exact decimal value that is really stored together with the rounding error. It also decodes a hex or binary bit pattern back into a number, including zeros, subnormals, infinities and NaN.

How to use this tool

  1. Type a number — a decimal such as 0.1, a fraction such as 1/3, a C hex float, inf or nan — or paste a bit pattern.
  2. Choose whether the value is a number or hex/binary bits.
  3. Pick half, single or double precision.
  4. Read the hex and binary encoding, the field breakdown, the exact stored value and the error; the table compares all three formats.

Formula

value = (−1)^sign × 1.mantissa₂ × 2^(exponent − bias) · subnormal: (−1)^sign × 0.mantissa₂ × 2^(1 − bias)

Bias = 15 (half), 127 (single), 1023 (double). An exponent field of all zeros means zero or a subnormal; all ones means infinity (mantissa 0) or NaN. Conversion uses exact integer arithmetic and rounds to nearest, ties to even, so the result matches a correctly rounding compiler or parser; the shortest round-trip decimal is the shortest number that converts back to the same bits.

Example

0.1 in single precision becomes 0x3DCCCCCD = 0 01111011 10011001100110011001101: sign 0, exponent 123 − 127 = −4, significand 1.60000002384185791015625. The stored value is exactly 0.100000001490116119384765625, so the rounding error is +0.000000001490116119384765625. In double precision 0.1 becomes 0x3FB999999999999A, about 0.1000000000000000055511.

Frequently asked questions

Why is 0.1 + 0.2 not 0.3?

None of the three numbers is exactly representable in binary. Each is rounded to the nearest double, and the rounding errors do not cancel, so the sum is 0.30000000000000004 rather than the double nearest to 0.3.

What is a subnormal number?

A value smaller than the smallest normal number. The exponent field is zero and there is no hidden leading 1, which lets values fade gradually towards zero, at the cost of precision.

Why does 65520 become infinity in half precision?

The largest half-precision value is 65504. 65520 lies exactly halfway between 65504 and the next step, 65536, which is beyond the format, and round-to-nearest-even sends it to infinity.

What is the difference between a quiet and a signaling NaN?

Both are "not a number". The top mantissa bit is 1 for a quiet NaN, which passes silently through arithmetic; a signaling NaN has it 0 and is meant to raise an exception when used.

Sources

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 8). IEEE 754 Floating-Point Converter. https://kakao.mobile/tools/ieee-754-converter/

MLA

“IEEE 754 Floating-Point Converter.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/ieee-754-converter/.

Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms

Advertisement