Binary Floating-Point Converter
Convert normalized binary floating-point notation to decimal or convert decimal numbers into binary floating-point form. View the significand, binary exponent, normalized representation, approximation error, and conversion details.
Binary Floating-Point to Decimal
Enter a binary significand and a base-2 exponent.
Decimal to Binary Floating-Point
Convert a decimal number into normalized binary scientific notation.
What Is Binary Floating-Point?
Binary floating-point represents numbers using a binary significand and an exponent. Instead of keeping the binary point at one permanent location, the exponent determines how far the effective binary point moves.
A normalized binary floating-point value is commonly written in a form such as 1.101 x 2^3. The significand contains the significant binary digits, while the exponent controls the scale of the number.
This gives floating-point formats a much larger dynamic range than fixed-point formats, although some decimal values cannot be represented exactly with a finite number of binary fractional digits.
Binary Floating-Point Formula
Binary Floating-Point to Decimal
Convert the binary significand to its numerical value and multiply by two raised to the exponent.
Decimal to Binary Floating-Point
Convert the decimal value to binary, normalize it so that one nonzero binary digit appears before the point, and record the corresponding power of two.
Binary Fraction Place Value Table
Binary digits to the right of the binary point represent negative powers of two.
| Binary Position | Power of Two | Decimal Value | Example Contribution |
|---|---|---|---|
| 1st fractional bit | 2^-1 | 0.5 | 1 = 0.5 |
| 2nd fractional bit | 2^-2 | 0.25 | 1 = 0.25 |
| 3rd fractional bit | 2^-3 | 0.125 | 1 = 0.125 |
| 4th fractional bit | 2^-4 | 0.0625 | 1 = 0.0625 |
| 5th fractional bit | 2^-5 | 0.03125 | 1 = 0.03125 |
| 8th fractional bit | 2^-8 | 0.00390625 | 1 = 0.00390625 |
| 16th fractional bit | 2^-16 | 0.0000152587890625 | 1 = 0.0000152587890625 |
Binary Floating-Point Normalization Examples
| Binary Number | Normalized Form | Exponent | Decimal Value |
|---|---|---|---|
| 101.1 | 1.011 x 2^2 | 2 | 5.5 |
| 1101.01 | 1.10101 x 2^3 | 3 | 13.25 |
| 10.101 | 1.0101 x 2^1 | 1 | 2.625 |
| 0.101 | 1.01 x 2^-1 | -1 | 0.625 |
| 0.00101 | 1.01 x 2^-3 | -3 | 0.15625 |
Worked Example 1: Binary Floating-Point to Decimal
Convert 1.101 x 2^3 to decimal.
Worked Example 2: Decimal to Binary Floating-Point
Convert decimal 13.25 to normalized binary floating-point notation.
Worked Example 3: Small Fraction
Convert binary 1.01 x 2^-3 into decimal.
Worked Example 4: Negative Floating-Point Value
Binary Floating-Point Precision
Not every decimal fraction has a finite binary representation. Values such as 0.5, 0.25 and 0.125 convert exactly because their denominators are powers of two. Other values may repeat indefinitely in binary.
| Decimal | Binary Representation | Exact? |
|---|---|---|
| 0.5 | 0.1 | Yes |
| 0.25 | 0.01 | Yes |
| 0.125 | 0.001 | Yes |
| 0.75 | 0.11 | Yes |
| 0.1 | Repeating binary fraction | No, finite precision required |
| 0.2 | Repeating binary fraction | No, finite precision required |
Binary Floating-Point vs Fixed-Point
| Feature | Floating Point | Fixed Point |
|---|---|---|
| Binary point | Effectively moves using exponent | Fixed position |
| Range | Very large | Limited by fixed allocation |
| Precision | Relative to magnitude | Fixed resolution |
| Main components | Significand and exponent | Scaled integer |
| Hardware complexity | Generally higher | Often lower |
| Typical use | General and scientific computing | DSP, embedded and FPGA systems |
Binary Floating-Point Terms
Significand
The significant binary digits of the number. It is also commonly called the mantissa, although significand is the more precise technical term.
Exponent
The power of two used to scale the significand and determine the effective position of the binary point.
Normalization
Rewriting a nonzero binary value so that one significant binary digit appears before the binary point.
Precision
The number of significant binary digits retained when representing the value.
Common Powers of Two Reference
| Exponent | Power | Decimal Multiplier |
|---|---|---|
| -5 | 2^-5 | 0.03125 |
| -4 | 2^-4 | 0.0625 |
| -3 | 2^-3 | 0.125 |
| -2 | 2^-2 | 0.25 |
| -1 | 2^-1 | 0.5 |
| 0 | 2^0 | 1 |
| 1 | 2^1 | 2 |
| 2 | 2^2 | 4 |
| 3 | 2^3 | 8 |
| 4 | 2^4 | 16 |
| 5 | 2^5 | 32 |
Where Binary Floating-Point Is Used
General Computing
Floating-point representation is widely used for numerical calculations involving fractional or very large and small values.
Scientific Computing
Scientific calculations often require a wide dynamic range that is impractical with fixed-point formats.
Graphics
3D graphics, geometry, transformations, lighting and shader calculations commonly rely on floating-point arithmetic.
Machine Learning
Training and inference workloads use various floating-point formats to balance numerical precision, memory and computational performance.
Important Binary Floating-Point Considerations
IEEE 754 stores floating-point numbers using a defined sign field, biased exponent and fraction field. Those formats should be analyzed with a dedicated IEEE 754 converter.
When converting decimal fractions to binary, some values require infinitely repeating binary digits. The selected precision therefore controls the approximation shown by this converter.