Binary Fraction Calculator

Binary Fraction Calculator

Convert decimal fractions to binary and vice versa with detailed step-by-step explanations.

2026-03-28T00:00:00Z

Result
0.101

Conversion Steps (Multiply by 2 Method)

0.625000 × 2 = 1.250000Bit: 1
Remainder: 0.250000
0.250000 × 2 = 0.500000Bit: 0
Remainder: 0.500000
0.500000 × 2 = 1.000000Bit: 1
Remainder: 0.000000

What are Binary Fractions?

Binary fractions are fractional numbers represented in base-2 (binary) notation, just like decimal fractions are represented in base-10. In binary fractions, each digit to the right of the binary point represents a negative power of 2.

For example, in the binary fraction 0.101:

  • The first digit (1) represents 1 × 2⁻¹ = 1/2 = 0.5
  • The second digit (0) represents 0 × 2⁻² = 0/4 = 0
  • The third digit (1) represents 1 × 2⁻³ = 1/8 = 0.125
  • Total: 0.5 + 0 + 0.125 = 0.625 in decimal

Binary fractions are essential in computer science and digital electronics because computers store and process all numbers in binary format, including fractional values (floating-point numbers).

How to Convert Binary Fractions

Decimal to Binary (Multiply by 2 Method)

  1. Start with the fractional part: Multiply by 2.
  2. Record the integer part: If the result is ≥ 1, write "1". Otherwise, write "0".
  3. Keep the fractional part: Subtract 1 if you got ≥ 1, otherwise keep as is.
  4. Repeat: Continue until the fraction becomes 0 or you reach desired precision.

Binary to Decimal (Positional Method)

  1. Identify positions: Each digit after the binary point has a position (1st, 2nd, 3rd, etc.).
  2. Calculate values: For each "1" bit, calculate 2⁻ⁿ where n is the position.
  3. Sum all values: Add all the calculated values together.

Common Examples

Example 1: 0.75 to Binary

0.75 × 2 = 1.5 → bit: 1, remainder: 0.5
0.5 × 2 = 1.0 → bit: 1, remainder: 0
Result: 0.11

Example 2: 0.110 to Decimal

Position 1: 1 × 2⁻¹ = 0.5
Position 2: 1 × 2⁻² = 0.25
Position 3: 0 × 2⁻³ = 0
Sum: 0.5 + 0.25 = 0.75

Example 3: 0.1 (Repeating)

0.1 in decimal cannot be exactly represented in binary
0.1₁₀ = 0.0001100110011... (repeating)
This is why 0.1 + 0.2 ≠ 0.3 in many programming languages!

Example 4: 0.125 to Binary

0.125 = 1/8 = 2⁻³
Result: 0.001
Powers of 2 convert exactly!

Frequently Asked Questions

Can all decimal fractions be exactly represented in binary?

No. Only fractions that can be expressed as a sum of powers of 2 (like 0.5, 0.25, 0.75) can be exactly represented. Others like 0.1 or 0.3 result in repeating binary fractions.

Why does 0.1 + 0.2 ≠ 0.3 in programming?

Because 0.1 and 0.2 cannot be exactly represented in binary. They're stored as approximations, and when added, the rounding errors accumulate, resulting in 0.30000000000000004 instead of 0.3.

How many digits of precision should I use?

For most purposes, 20 binary digits is sufficient. In practice, computers use 23 bits for float (32-bit) and 52 bits for double (64-bit) precision floating-point numbers.

What's the largest fractional value in binary?

Just like in decimal, you can get arbitrarily close to 1.0 (but never reach it with only fractional digits). For example, 0.111111... in binary approaches 1.0.

How do I represent negative binary fractions?

Use a sign bit (like in floating-point representation), or use two's complement for the entire number including the fractional part.

What are floating-point numbers?

Floating-point numbers are a way to represent very large and very small numbers in binary using scientific notation: sign × mantissa × 2^exponent.

Can I convert mixed numbers (like 3.625)?

Yes! Convert the integer part (3 = 11 in binary) and fractional part (0.625 = 0.101 in binary) separately, then combine them: 11.101

Why are binary fractions important in computer science?

All data in computers is stored in binary. Understanding binary fractions helps explain precision issues, rounding errors, and why certain decimal numbers can't be stored exactly.

Related Tools