Guide
How floating-point numbers are stored: IEEE 754 explained
Almost every programming language stores non-integer numbers in a format defined by the IEEE 754 standard. It packs a sign, an exponent and a fraction into 32 or 64 bits, and it is fast and compact, but it has surprises. This page opens the box: type a number, and you see the actual bits and the exact value they stand for.
Three fields
A float is a sign bit, a biased exponent, and a mantissa. The value is (−1)^sign × 1.mantissa × 2^(exponent − bias). The leading 1 is not stored, which is the “hidden bit” that gives one extra bit of precision. A single-precision number has 8 exponent bits with bias 127 and 23 mantissa bits; a double has 11 exponent bits with bias 1023 and 52 mantissa bits. The page colours the three groups and prints the formula with your numbers filled in.
Why decimals are not exact
A fraction can be written exactly in binary only if its denominator is a power of two. One tenth is not, so it has an endless binary expansion that is rounded to 53 significant bits in a double. The stored value of 0.1 is 0.1000000000000000055511151231257827…, a little above one tenth. The page prints this exact expansion, and also the shortest decimal string that reads back to the same double, which is why programs usually show 0.1.
Special values
When the exponent field is all ones, the number is infinity (mantissa zero) or not-a-number (mantissa non-zero). When the exponent is all zeros, the number is zero or subnormal, with no hidden bit, and the spacing between values becomes constant. Both a positive and a negative zero exist. The quick buttons on the page include −0, Infinity and the not-a-number value, so you can see their bit patterns.
Neighbours and flipping bits
Floating-point numbers are not evenly spaced: the gap doubles at every power of two. The buttons for the previous and next representable number show how far apart the neighbours are, and clicking a bit flips it and updates the value. Flipping the lowest mantissa bit is the quickest way to understand rounding error, and flipping an exponent bit shows how steeply the value scale changes.
A worked example
The double nearest to 0.1 has the hexadecimal form 3FB999999999999A. Its sign is 0, its exponent field is 01111111011 (1019, so the power is 2⁻⁴), and its mantissa is 1001 repeated, ending in 1010 after rounding. The single-precision value is 3DCCCCCD, whose exact value is 0.100000001490116119384765625. For the sum, the double of 0.3 is 3FD3333333333333 (exactly 0.29999999999999998889776975…) while 0.1 + 0.2 produces 3FD3333333333334, printed as 0.30000000000000004.
Limits
Only binary32 and binary64 are covered. Half precision, the 80-bit extended format of some processors, and the decimal formats of IEEE 754-2008 are not. The page converts one number at a time and does not simulate operations or rounding modes. A value typed as decimal is rounded to the nearest representable number, as a compiler would, and the page tells you the exact value that results. Bit patterns use the order of the displayed bits and ignore byte order.
Related tools
- Decimal to Binary shows why a fraction like 0.1 never ends in base 2.
- Hex to Binary expands a pattern such as 3FB999999999999A into bits.
- Endian Converter fixes the byte order of a float read from a file.
- Two’s Complement Calculator covers the storage of signed integers.
Checked against the current version of the IEEE 754 Converter on .

