IEEE 754 Converter
Inspect floating-point numbers one bit at a time. Convert decimal, hexadecimal or binary input, see exact stored values and rounding errors, and step to adjacent representable numbers.
Inspect a floating-point representation
Decimal: up to 2,000 digits, with optional e exponent from −10,000 to 10,000; also Infinity, -Infinity and NaN. Bits: exactly 8 hex digits or 32 binary digits, most significant first; spaces, underscores and 0x/0b prefixes are allowed.
Changing input format converts the current valid result. Changing precision keeps your input and interprets it at the new width; bit patterns must match that width. Decimal NaN creates a canonical quiet payload; use bits to preserve another payload.
Stored binary32 value
normal0x3dcccccdRounded upward to the nearest representable value (ties to even).
Value = (−1)^0 × 13421773 × 2^(-27)
Every finite binary floating-point value has an exact terminating decimal. This full expansion can be much longer than a typical rounded display. A rational zero has no sign; the bit pattern and decimal above retain signed zero.
Toggle individual bits
Bit 31 is the sign; bit 0 is the least significant fraction bit. Buttons show the bit value above its index. Toggling switches to hex input and preserves the exact modified pattern.
Sign
Exponent · 8 bits
Fraction · 23 stored bits
Adjacent representable values
Next down and next up move in numeric order. From either signed zero, they move to the smallest negative or positive subnormal. Infinity is an endpoint: stepping outward keeps that infinity. NaN has no ordered neighbors.
Next down
0x3dcccccc
0.0999999940395355224609375
Next up
0x3dccccce
0.10000000894069671630859375
IEEE 754 binary32 and binary64 with direct round-to-nearest, ties-to-even decimal conversion. Exact bit patterns and rational values; decimal inputs may round. NaN payloads are preserved in bit input. Values remain in browser memory and are not automatically saved.
Common questions
- What is the IEEE 754 representation of 1.0?
- In binary32, 1.0 is 0x3f800000: sign zero, stored exponent 127 and fraction zero. In binary64 it is 0x3ff0000000000000, with stored exponent 1023. Both are exact.
- Why does 0.1 change when stored as a float?
- One tenth has an infinite binary expansion, so a finite binary format rounds it. In binary32, the stored value is exactly 0.100000001490116119384765625. The inspector shows the full decimal, exact rational and signed rounding error: stored value minus supplied decimal.
- Does decimal conversion use ties-to-even rounding?
- Yes. Decimal input is parsed as an exact integer ratio and rounded directly to binary32 or binary64. At an exact halfway point, the representable value with an even significand is selected. Binary32 input is not first rounded through a JavaScript binary64 value, which avoids double rounding near a boundary.
- What are subnormal numbers and signed zero?
- Subnormals use a zero exponent field without an implicit leading one. The smallest positive binary32 subnormal is 2^-149; for binary64 it is 2^-1074. Zero has a separate sign bit, so +0 and -0 have different bit patterns even though their rational values are both zero.
- How are NaN payloads handled?
- Hexadecimal and binary input preserve all NaN bits, including sign, quiet flag and payload. The inspector uses the usual IEEE binary convention in which the leading fraction bit indicates a quiet NaN. Decimal NaN creates a canonical quiet NaN; switching a custom NaN to decimal input replaces its payload. NaN has no rational value or ordered neighbors.
- What do next up and next down mean?
- They are neighboring values in numeric order for the selected precision. From either signed zero, next up is the smallest positive subnormal and next down the smallest negative subnormal. Stepping outward from an infinity keeps that infinity. The buttons load the neighboring bit pattern for inspection.
- Which inputs are supported?
- Decimal input accepts up to 2,000 digits and an exponent between -10,000 and 10,000, plus Infinity, -Infinity and NaN. Hex input needs eight digits for binary32 or sixteen for binary64. Binary input needs exactly 32 or 64 bits. Spaces, underscores and matching prefixes are allowed for bit patterns. Inputs stay in the browser; TXT exports the inspection.
IEEE 754 binary32 and binary64 with direct round-to-nearest, ties-to-even decimal conversion. Exact bit patterns and rational values; decimal inputs may round. NaN payloads are preserved in bit input.