ThisCalculator

Conversions

Binary Fraction Calculator: Convert & Add

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Binary Fraction Calculator: Convert & Add

This calculator converts decimal numbers into their binary fraction representation and can add two binary fractions. You enter a decimal number (like 0.375) or two binary fractions (like 101.101), and the calculator shows the equivalent in the other form, along with the sum when adding. It handles both integer and fractional parts, using the standard IEEE 754-style conversion for fractions.

Formula

The core idea is that any binary fraction is a sum of powers of 2, where the exponent is negative for digits after the binary point. For a binary number like 101.101, each digit represents a power of 2:

  • The integer part (left of the point) uses positive powers: 1×2² + 0×2¹ + 1×2â�° = 4 + 0 + 1 = 5.
  • The fractional part (right of the point) uses negative powers: 1×2â�»Â¹ + 0×2â�»Â² + 1×2â�»Â³ = 0.5 + 0 + 0.125 = 0.625.
  • So 101.101â‚‚ = 5 + 0.625 = 5.625â‚�â‚€.

To convert a decimal fraction to binary, repeatedly multiply the fractional part by 2. The integer part of each product becomes the next binary digit. For example, converting 0.375:

  1. 0.375 × 2 = 0.75 → digit 0
  2. 0.75 × 2 = 1.5 → digit 1 (take the 0.5 for the next step)
  3. 0.5 × 2 = 1.0 → digit 1 (stop when the fraction becomes 0)

Thus 0.375�₀ = 0.011₂. The calculator uses this multiply-by-2 method, stopping when the fractional part is zero or after a set number of digits (here, 6).

Worked Example

Using the default values from the calculator:

  • Decimal input: 0.375
  • Binary fraction 1: 101.101
  • Binary fraction 2: 10.01

Step 1: Convert 0.375 to binary. As shown above, multiply by 2 repeatedly: 0.375 → 0.75 (0), 0.75 → 1.5 (1), 0.5 → 1.0 (1). Result: 0.011₂.

Step 2: Convert each binary fraction to decimal.

  • 101.101â‚‚ = 5 + 0.625 = 5.625
  • 10.01â‚‚ = 2 + 0.25 = 2.25

Step 3: Add the binary fractions directly. Align the binary points:

  101.101
+  10.010
---------
  111.111

111.111₂ = 7 + 0.875 = 7.875�₀.

Step 4: Verify with decimals. 5.625 + 2.25 = 7.875. The calculator shows the sum as 111.111 in binary and 7.875 in decimal, matching our manual calculation.

When to Use This Calculator

Binary fractions appear in computer science, digital electronics, and low-level programming. You might need to:

  • Convert a decimal measurement (like 0.1 seconds) into a binary fraction for a microcontroller register.
  • Check the result of adding two binary numbers that have fractional parts, common in floating-point arithmetic.
  • Understand why some decimal numbers (like 0.1) have infinite binary expansions—this calculator shows the truncated version.

It’s also a great teaching tool for students learning number systems. Instead of doing long division by hand, you can verify your homework or experiment with different values.

How to Read the Result

The first output, Binary fraction (from decimal), shows the binary representation of the decimal you entered. If the decimal has a terminating binary expansion (like 0.375), the result is exact. If not (like 0.2), the result is truncated to 6 fractional digits, so it’s an approximation.

The second output, Sum of binary fractions, is the binary sum of the two binary inputs. The third output gives the same sum in decimal, which is often easier to verify. When reading the binary sum, remember that the point separates the integer part from the fractional part, just like a decimal point.

For example, if you enter 0.1 as the decimal, the calculator returns 0.000110 (truncated), because 0.1 in binary is 0.0001100110011… repeating. The 6-digit result is an approximation, not exact.

Common Mistakes and Limitations

One frequent error is confusing the binary point with a decimal point. In binary, the place values to the right are 1/2, 1/4, 1/8, etc., not 1/10, 1/100. Another mistake is forgetting to align the points when adding two binary fractions—just like decimal addition, the points must line up.

Limitations of the calculator:

  • It only handles positive numbers (no negative binary fractions).
  • The binary output is limited to 6 fractional digits, so very small fractions may be rounded to zero.
  • It does not handle exponents or scientific notation; for very large or small numbers, you’d need a floating-point calculator.

Also, note that the binary addition is done exactly, but the decimal conversion of the sum is rounded to 6 decimal places. This can cause a tiny difference if you compare the sum’s decimal to adding the individual decimal conversions.

Why Binary Fractions Matter

Computers store all numbers in binary, and fractions are no exception. The IEEE 754 standard, used in most programming languages, represents fractions as binary significands and exponents. Understanding binary fractions helps you grasp why floating-point arithmetic sometimes gives surprising results, like 0.1 + 0.2 not equaling 0.3 exactly. The issue is that 0.1 and 0.2 both have infinite binary expansions, so the computer rounds them, leading to a tiny error.

This calculator demonstrates that concept in a simple way: enter 0.1 and see the truncated binary. Then enter 0.2 and see its binary. Adding the two truncated values gives a result that is close to 0.3 but not exact, just like in a computer.

Frequently Asked Questions

How do I convert a decimal like 0.625 to binary by hand?

Multiply the fractional part by 2. The integer part of the product becomes the next binary digit. For 0.625: 0.625×2=1.25 → digit 1, take 0.25; 0.25×2=0.5 → digit 0; 0.5×2=1.0 → digit 1. So 0.625�₀ = 0.101₂.

Can this calculator handle negative numbers?

No, the calculator only accepts non-negative values. For negative numbers, you’d typically use two’s complement or a sign bit, which is beyond the scope of this simple converter.

Why does 0.1 in binary show as 0.000110 instead of something longer?

Because the calculator truncates to 6 fractional digits. The exact binary expansion of 0.1 is 0.0001100110011… repeating. With 6 digits, we get 0.000110, which is an approximation. More digits would give a closer value.

What is the difference between a binary fraction and a decimal fraction?

A decimal fraction uses powers of 10 (tenths, hundredths), while a binary fraction uses powers of 2 (halves, quarters). For example, 0.5 in decimal is 0.1 in binary, because 1/2 = 0.5. Both represent the same quantity, but with different base systems.

How do I add two binary fractions manually?

Align the binary points, then add each column from right to left, carrying 1 when the sum is 2. For example, 1.1 + 1.1: align points, add 1+1=2 in the fractional column, write 0 carry 1; then 1+1+1=3, write 1 carry 1; result is 11.0₂ = 3�₀.

Is there a limit to the size of the binary number I can enter?

The calculator accepts any reasonable-length binary string, but the output is rounded to 6 fractional digits. For very long inputs, the integer part is preserved, but the fractional part may be truncated, so you might lose precision.

Related

Formula used
in dec | Decimal number | - | 0.375 | 0
in bin1 | First binary fraction | - | 101.101 | 0
in bin2 | Second binary fraction | - | 10.01 | 0
out bin_result | Binary fraction (from decimal) | - | dec_to_bin(dec) | 6
out sum_bin | Sum of binary fractions | - | bin_add(bin1, bin2) | 6
out sum_dec | Sum in decimal | - | bin_to_dec(bin1) + bin_to_dec(bin2) | 6

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.