Binary layout
Enter a decimal number for each format. Values are stored in IEEE 754 binary32 (single) and binary64 (double). Byte order shown is big-endian (network order).
32-bit float (binary32)
64-bit double (binary64)
How IEEE 754 binary floats are laid out
Sign, exponent, and significand
IEEE 754 is the standard almost every modern CPU uses for floating-point numbers. A value is split into a sign bit, a biased exponent field, and a fraction (mantissa / significand) field. This page shows binary32 (single precision, 32 bits) and binary64 (double precision, 64 bits) for a decimal you enter, including hex patterns and field breakdowns. Bytes are shown in big-endian (network) order for readability.
Field widths
- binary32: 1 sign + 8 exponent + 23 fraction bits
- binary64: 1 sign + 11 exponent + 52 fraction bits
Normal numbers use an implicit leading 1 in the significand. Special patterns encode subnormals, ±infinity, and NaN (not a number).
Worked example
The decimal 0.1 cannot be represented exactly in binary floating point. binary64 stores the closest value; the hex pattern is the well-known repeating approximation that causes classic 0.1 + 0.2 ≠ 0.3 surprises in many languages. Inspecting the bits shows why pocket-decimal fractions misbehave.
Why endianness matters
The logical fields are defined left-to-right in the standard diagrams, but memory order on a machine may be little-endian. This tool displays big-endian byte order so hex dumps match common textbook diagrams and network traces. Use Byte Storage Order when comparing CPU memory dumps.
Common mistakes
- Comparing floats with
==after decimal arithmetic. - Assuming more decimal digits always increase accuracy — binary64 still has a finite significand.
- Forgetting NaN ≠ NaN under IEEE comparison rules.
FAQs
- Is this the same as decimal128?
- No. Decimal floating formats exist in IEEE 754 but this page focuses on the ubiquitous binary32/binary64 pair.
- Can I edit hex to change fields?
- Enter a decimal; the layout updates from the rounded binary encoding.
Related: Byte Storage Order, Signed & Unsigned, Bitwise Operations.
Last updated: July 2026