🧮
🧮 Math & statistics

IEEE 754 Floating-Point Converter (32 & 64-bit)

Results update as you type.

Your numbers

Understanding the IEEE 754 floating-point converter — concept and principle

IEEE 754 is the international standard for how computers store real numbers in binary. This converter shows how a decimal number is encoded in 32-bit single precision and 64-bit double precision, splits the 32-bit pattern into its sign, exponent and mantissa fields, and reveals the value that is actually stored.

IEEE 754 single-precision fields for 0.10.1 is stored as sign 0, exponent 01111011 (123 − 127 = −4) and mantissa 10011001100110011001101 (about 1.6), hex 3DCCCCCD, which is really 0.1000000015.How 0.1 is stored in 32 bits= 3DCCCCCD in hex (dark = 1, light = 0)Sign · 1 bit+ positive0Exponent · 8 bits123 − 127 = −401111011Mantissa · 23 bits1.fraction ≈ 1.610011001100110011001101+1.6 × 2⁻⁴ ≈ 0.10000000150.1 cannot be stored exactly in binary
Sign × 1.mantissa × 2^(exponent − 127): the closest float to 0.1 is a little above it.

How it is calculated

A normal floating-point number is stored as

value = (−1)^s × 1.f × 2^(e − bias)

The input is rounded to the nearest representable value (ties to even).

The principle

Floating point is scientific notation in base 2: a fixed number of significant bits plus an exponent that moves the binary point. This gives a huge range with a constant relative precision of about 7 decimal digits in single and about 16 in double precision. The catch is that only fractions whose denominator is a power of 2 can be stored exactly. 1/10 has a factor 5 in its denominator, so in binary it is the repeating pattern 0.000110011001100…, which must be cut off and rounded, just as 1/3 must be rounded in decimal.

Worked example

  1. Input: 0.1. Write it as 1.6 × 2⁻⁴, so s = 0.
  2. Exponent field: −4 + 127 = 123 = 01111011.
  3. Fraction: 0.6 in binary is 0.1001 1001 1001…; keeping 23 bits and rounding up the last one gives 10011001100110011001101.
  4. Together the bits read 0 01111011 10011001100110011001101, which is 3DCCCCCD in hex.
  5. Stored value: 13,421,773 ÷ 2²⁷ = 0.100000001490116…, shown as 0.1000000015.
  6. Double precision: exponent −4 + 1023 = 1019 = 3FB, and the 52-bit fraction rounds to 999999999999A, giving 3FB999999999999A.

How to read the result

The stored value shows the representation error. For 0.1 in single precision it is about 1.5 × 10⁻⁹; in double precision the stored value is 0.1000000000000000055…, accurate to about 17 significant digits. An exponent field of all zeros means zero or a subnormal number; all ones means infinity or NaN. The largest finite single-precision value is about 3.40 × 10³⁸ and the largest double is about 1.80 × 10³⁰⁸.

Common mistakes

Keep in mind: The tool uses the browser's round-to-nearest conversion. Other rounding modes or compiler optimizations can give slightly different results in real programs.

Frequently asked questions

Why does 0.1 + 0.2 give 0.30000000000000004?

Both inputs are rounded when stored, and their sum rounds to the double just above 0.3 rather than the double nearest to 0.3.

Which integers can a double store exactly?

Every integer with magnitude up to 2⁵³ = 9,007,199,254,740,992.

Sources: IEEE Std 754-2019, IEEE Standard for Floating-Point Arithmetic · D. Goldberg, "What Every Computer Scientist Should Know About Floating-Point Arithmetic", ACM Computing Surveys 23(1), 1991

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →