Binary Decimal Representation
Binary fractions use a binary point. Each position to the right is 2⁻¹, 2⁻², 2⁻³... = 1/2, 1/4, 1/8. Only fractions with denominator powers of 2 have exact finite binary.
Why This Mathematical Concept Matters
Why: 0.1 cannot be represented exactly in binary — it's an infinite repeating pattern. This causes floating-point errors.
How: Binary to decimal: multiply each bit by its positional value and sum. Decimal to binary: repeatedly multiply by 2, take integer part.
- ●0.5 = 0.1₂, 0.25 = 0.01₂, 0.125 = 0.001₂ — powers of 2 have exact binary.
- ●0.1 + 0.2 ≠ 0.3 in many languages due to binary approximation.
- ●IEEE 754 defines single (32-bit) and double (64-bit) precision formats.
Binary Fractions — Representing Decimals in Binary
Convert between binary fractions and decimals. See bit positions (2⁻¹, 2⁻²...), precision, and integer vs fractional breakdown. Understand why 0.1 can't be exact.
🔢 Load Sample Example — Click to Load
⚠️For educational and informational purposes only. Verify with a qualified professional.
🧮 Fascinating Math Facts
0.1 cannot be represented exactly in binary — it's an infinite repeating pattern.
— Floating-point arithmetic
IEEE 754 defines how computers store floating-point numbers.
— IEEE 754
📋 Key Takeaways
- • Binary point: The binary equivalent of a decimal point
- • Positional values: 2⁻¹, 2⁻², 2⁻³... = 1/2, 1/4, 1/8...
- • Some decimals can't be exactly represented: 0.1 in binary is repeating (0.0(0011))
- • Finite binary: Only fractions with denominator powers of 2 (e.g., 0.5, 0.25, 0.125) have exact finite binary
💡 Did You Know?
📖 How Binary Fractions Work
Binary fractions use a binary point. Each position to the right represents a negative power of 2: 2⁻¹ (1/2), 2⁻² (1/4), 2⁻³ (1/8), etc.
Binary to Decimal
Multiply each bit by its positional value and sum. Example: 0.101₂ = 1×½ + 0×¼ + 1×⅛ = 0.5 + 0 + 0.125 = 0.625₁₀
Decimal to Binary (fractional)
Repeatedly multiply by 2; take the integer part as the next bit. Example: 0.625 × 2 = 1.25 → bit 1; 0.25 × 2 = 0.5 → bit 0; 0.5 × 2 = 1.0 → bit 1. Result: 0.101₂
Repeating decimals
Fractions with denominators not powers of 2 (e.g., 1/10, 1/3) produce infinitely repeating binary patterns, like 1/3 = 0.333... in decimal.
🎯 Expert Tips
💡 Use Decimal for money
Financial apps use decimal types (e.g., Java BigDecimal) to avoid floating-point rounding errors.
💡 Compare with tolerance
Never use == for floats. Use abs(a - b) < epsilon for comparisons.
💡 Powers of 2 are exact
0.5, 0.25, 0.125, 0.0625... have exact finite binary representations.
💡 IEEE 754 precision
Single precision ≈ 7 decimal digits; double precision ≈ 15–17 digits.
⚖️ Decimal vs Binary Fraction Comparison
| Decimal | Binary | Exact? |
|---|---|---|
| 0.5 | 0.1 | Yes |
| 0.25 | 0.01 | Yes |
| 0.125 | 0.001 | Yes |
| 0.1 | 0.0(0011)... | No (repeating) |
| 0.333... | 0.0(01)... | No (repeating) |
| 0.75 | 0.11 | Yes |
❓ Frequently Asked Questions
Why can't 0.1 be represented exactly in binary?
0.1 = 1/10. The denominator 10 has prime factor 5, which is not a factor of 2. So 1/10 has no finite binary expansion — it repeats infinitely.
What is the binary point?
The binary point is the base-2 equivalent of the decimal point. Digits to the right represent negative powers of 2: 2⁻¹, 2⁻², 2⁻³, etc.
What are the positional values in binary fractions?
First position after binary point = 2⁻¹ = 1/2; second = 2⁻² = 1/4; third = 2⁻³ = 1/8; etc.
Why does 0.1 + 0.2 ≠ 0.3 in programming?
Floating-point uses binary. 0.1 and 0.2 are approximated; their sum is slightly different from the approximation of 0.3.
What is IEEE 754?
The standard for floating-point arithmetic. Defines single (32-bit) and double (64-bit) precision formats used by most computers.
Which decimals have exact binary representation?
Only fractions whose denominator is a power of 2: 1/2, 1/4, 1/8, 1/16, etc. Examples: 0.5, 0.25, 0.125.
How do I convert 0.75 to binary?
0.75 = ½ + ¼. So 0.75₂ = 0.11₂ (first bit is 1/2, second is 1/4).
What causes floating-point errors in finance?
Money amounts like $0.10 are stored as binary approximations. Adding many such values can accumulate rounding errors. Use decimal types for money.
📊 Binary Fractions by the Numbers
📚 Official Data Sources
⚠️ Disclaimer: This calculator is for educational purposes. Results may be approximations for some decimals (e.g., 0.1, π). Not a substitute for professional numerical analysis or programming advice. Always verify critical calculations.