User Rating 0.0
Total Usage 0 times
Sign -
Exponent -
Mantissa -
0 / 52 bits
Presets:
Is this tool helpful?

Your feedback helps us improve.

About

Every floating-point number stored in a computer follows the IEEE 754 standard. A 64-bit double-precision float is partitioned into three fields: 1 sign bit, 11 exponent bits, and 52 mantissa (significand) bits. Misunderstanding this layout causes silent precision errors in financial calculations, physics simulations, and hash-dependent systems. This tool performs real binary decomposition using ArrayBuffer and DataView, letting you inspect and replace the mantissa fraction bits of any double-precision number. The result is a genuinely reassembled IEEE 754 value, not a textual approximation.

Note: the mantissa field stores only the fractional part. IEEE 754 normal numbers assume an implicit leading 1 bit (the "hidden bit"), so the true significand is 1.f where f is the stored 52-bit fraction. Subnormal numbers (exponent all zeros) lack this hidden bit. This tool preserves exponent and sign while swapping only the fraction bits. Values outside the 52-bit range are truncated from the right.

mantissa IEEE 754 floating point significand binary exponent double precision

Formulas

An IEEE 754 double-precision number v is composed from three binary fields:

v = (−1)s × 2e 1023 × (1 + m252)

For subnormal numbers (exponent field = 0):

v = (−1)s × 2−1022 × m252

Where s = sign bit (0 or 1), e = biased exponent (unsigned 11-bit integer, 0 - 2047), m = mantissa fraction (unsigned 52-bit integer, 0 - 2521). This tool keeps s and e intact while replacing m with a user-supplied 52-bit binary string.

Reference Data

FieldBitsPositionRange / Purpose
Sign1Bit 630 = positive, 1 = negative
Exponent11Bits 62 - 52Biased by 1023; range 0 - 2047
Mantissa (fraction)52Bits 51 - 0Fractional significand bits
Exponent 0Subnormal number (no hidden bit) or ±0
Exponent 2047±∞ (mantissa 0) or NaN (mantissa ≠ 0)
Smallest subnormal5 × 10−324
Largest subnormal2.225 × 10−308
Smallest normal2.2250738585072014 × 10−308
Largest finite1.7976931348623157 × 10308
Machine epsilon2−522.22 × 10−16
Precision (decimal)15 - 17 significant digits
Bias1023
Hidden bitImplicit 1 for normal numbers
NaN payloadAny non-zero mantissa with exponent 2047
Quiet NaNBit 51 of mantissa = 1
Signaling NaNBit 51 = 0, remaining ≠ 0

Frequently Asked Questions

In IEEE 754 terminology, the stored 52-bit field is the "trailing significand" or "fraction." The full significand includes the implicit leading 1 for normal numbers, making it 53 bits effective. "Mantissa" is technically a logarithm term but is widely used colloquially to mean the stored fraction bits. This tool modifies the 52-bit fraction field only.
It does for normal numbers. When the mantissa fraction is all zeros, the significand equals exactly 1.0, so the value becomes (−1)^s × 2^(e−1023). However, if the exponent field is 0 (subnormal), mantissa all-zeros yields ±0. If the exponent is 2047, mantissa all-zeros yields ±∞.
Yes. Set the exponent to 2047 (all 11 bits = 1) and provide any non-zero mantissa. If bit 51 of the mantissa is 1, you get a quiet NaN. If bit 51 is 0 and at least one other mantissa bit is 1, the standard defines it as a signaling NaN, though JavaScript's DataView will read both as NaN.
Strings shorter than 52 characters are right-padded with zeros (the missing least-significant bits default to 0). Strings longer than 52 characters are truncated from the right to exactly 52 bits, discarding the excess low-order bits. A toast notification warns you in either case.
The sign is always preserved. The exponent is also preserved, so the magnitude stays within the same power-of-two interval [2^(e−1023), 2^(e−1022)). Within that interval, increasing the mantissa increases the absolute value linearly. The mantissa all-zeros gives the lower bound, all-ones gives the upper bound minus one ULP.
None at the binary level. The tool performs exact bit manipulation via ArrayBuffer. The decimal display uses JavaScript's native Number-to-string conversion, which guarantees a round-trip-safe representation (15-17 significant digits). The displayed decimal is the shortest string that uniquely identifies the underlying 64-bit pattern.