IEEE 754 Double Precision Converter
Convert decimal values to IEEE 754 double-precision binary and hexadecimal, or decode a 64-bit IEEE 754 binary or hexadecimal pattern back to its numeric value. Inspect the sign bit, 11-bit exponent, 52-bit fraction, bias, classification and complete Binary64 representation.
—
—
—
—
What Is IEEE 754 Double Precision?
IEEE 754 double precision is a 64-bit binary floating-point format commonly called Binary64 or simply a double. It is widely used by programming languages, processors, scientific applications, databases and numerical software when more precision or range is needed than the 32-bit single-precision format can provide.
A Binary64 value divides its 64 bits into three fields: one sign bit, an 11-bit exponent and a 52-bit stored fraction. For normal finite numbers there is also an implicit leading binary 1, giving approximately 53 bits of significand precision.
IEEE 754 Double Precision Bit Layout
The 64-bit representation has a fixed structure. The most significant bit is the sign, followed by the exponent field and then the fraction field.
Bit 63:
Sign
Bits 62–52:
Exponent
11 bits
Bits 51–0:
Fraction / Mantissa field
52 stored bits
Total:
1 + 11 + 52
= 64 bits| Field | Bits | Purpose |
|---|---|---|
| Sign | 1 | Determines positive or negative sign |
| Exponent | 11 | Stores the exponent using bias 1023 |
| Fraction | 52 | Stores the fractional part of the significand |
IEEE 754 Double Precision Formula
For a normalized finite Binary64 value, the numerical value can be described using the sign, exponent and fraction fields.
Value =
(-1)^Sign
×
(1 + Fraction)
×
2^(Exponent - 1023)The stored fraction represents binary fractions such as 2^-1, 2^-2, 2^-3 and so on. The leading 1 in normalized values is implicit and is not physically stored in the 52-bit fraction field.
Example: Convert 10.5 to IEEE 754 Double Precision
The decimal value 10.5 has an exact finite binary representation, making it a useful example for understanding Binary64.
Decimal:
10.5
Binary:
1010.1
Normalized:
1.0101 × 2^3
Sign:
0
Unbiased exponent:
3
Biased exponent:
3 + 1023
= 1026
Exponent binary:
10000000010
IEEE 754 Hex:
4025000000000000The remaining fraction bits after the significant binary digits are filled with zeros to produce the complete 52-bit fraction field.
Example: Decode 3FF0000000000000
The hexadecimal pattern 3FF0000000000000 is one of the most recognizable Binary64 values because it represents decimal 1 exactly.
Hex:
3FF0000000000000
Binary:
0011111111110000000000000000000000000000000000000000000000000000
Sign:
0
Exponent:
01111111111
= 1023
Unbiased exponent:
1023 - 1023
= 0
Fraction:
0
Value:
1 × 2^0
= 1Exponent Bias 1023
The IEEE 754 Binary64 exponent field is unsigned, but floating-point numbers need both positive and negative exponents. A bias of 1023 solves this by storing the mathematical exponent after adding 1023.
Stored exponent =
Actual exponent + 1023
Example:
Actual exponent:
3
Stored:
3 + 1023
= 1026Exponent values 0 and 2047 have special meanings, so they are not used as ordinary normalized exponents.
Normal and Subnormal Double-Precision Values
When the exponent field is between 1 and 2046, the number is normalized and uses an implicit leading 1 in the significand. When the exponent field is zero but the fraction is nonzero, the value is subnormal.
| Exponent | Fraction | Classification |
|---|---|---|
| 1–2046 | Any | Normal finite number |
| 0 | 0 | Positive or negative zero |
| 0 | Nonzero | Subnormal number |
| 2047 | 0 | Positive or negative infinity |
| 2047 | Nonzero | NaN |
Positive Zero and Negative Zero
IEEE 754 contains two zero encodings. Positive zero has a sign bit of zero, while negative zero has a sign bit of one. All exponent and fraction bits are zero in both cases.
+0:
0000000000000000
-0:
8000000000000000Although positive and negative zero compare as equal in many calculations, the sign can matter in some floating-point operations and mathematical functions.
Infinity in IEEE 754 Binary64
Positive and negative infinity use an exponent field containing all ones and a fraction field containing all zeros. The sign bit distinguishes positive from negative infinity.
Positive Infinity:
7FF0000000000000
Negative Infinity:
FFF0000000000000NaN in IEEE 754 Double Precision
NaN means Not a Number. It uses an all-ones exponent field together with a nonzero fraction. NaNs can arise from undefined floating-point operations and may also carry additional payload information in their fraction bits.
Typical NaN pattern:
7FF8000000000000
Exponent:
11111111111
Fraction:
Nonzero
Classification:
NaNDouble Precision vs Single Precision
IEEE 754 single precision uses 32 bits, whereas double precision uses 64 bits. Binary64 provides both a larger exponent range and significantly greater precision.
| Property | Single / Binary32 | Double / Binary64 |
|---|---|---|
| Total bits | 32 | 64 |
| Sign bits | 1 | 1 |
| Exponent bits | 8 | 11 |
| Fraction bits | 23 | 52 |
| Exponent bias | 127 | 1023 |
| Approx. decimal precision | About 7 digits | About 15–17 digits |
Why Decimal 0.1 Is Not Exact in Binary64
Many decimal fractions cannot be represented using a finite binary fraction. Decimal 0.1 is one of the best-known examples. Its binary fractional expansion repeats indefinitely, so IEEE 754 stores the closest representable Binary64 value.
Decimal requested:
0.1
IEEE 754 Binary64 hex:
3FB999999999999A
Stored value:
nearest representable double to 0.1This behavior explains many small floating-point rounding effects seen in programming languages and numerical calculations.
Hexadecimal IEEE 754 Representation
Hexadecimal is particularly convenient for displaying floating-point bit patterns because every hexadecimal digit represents exactly four bits. Therefore a 64-bit double always fits into exactly 16 hexadecimal digits.
64 bits
÷ 4 bits per hex digit
= 16 hexadecimal digits
Example:
0100000000100101000000000000000000000000000000000000000000000000
Hex:
4025000000000000Where IEEE 754 Double Precision Is Used
Binary64 is widely used in scientific computing, engineering calculations, JavaScript numbers, C and C++ double values, Java double values, Python floats, databases, spreadsheets, simulations, graphics, numerical algorithms and many hardware floating-point units.
A converter that exposes the raw sign, exponent and fraction fields is useful for debugging numerical software, studying floating-point representation, inspecting memory dumps and understanding precision or rounding problems.