Binary Fraction Converter
This converter works both ways between decimal fractions and binary fractions, handling mixed numbers with both a whole-number part and digits after the point. Enter a decimal number such as 6.625 into the Decimal to Binary field and choose a fractional precision of 8, 16 or 32 bits, and the tool splits it into integer and fractional parts, converts the integer using repeated division by 2 and the fraction using repeated multiplication by 2, then returns the combined binary result with a full step-by-step breakdown of each multiplication and the bit it produces. Enter a binary number such as 110.101 into the Binary to Decimal field and it separates the integer and fractional bits, applies the correct power-of-2 weight to each fractional digit (0.5, 0.25, 0.125 and so on), and totals them to give you the decimal equivalent, again with every step shown. Both results tell you whether the conversion is exact or truncated, because only decimal fractions whose denominator is a power of 2 (like 0.5, 0.25 or 0.625) convert exactly to binary; others, such as 0.1 or 0.3, repeat forever and are cut off at your chosen precision, which is why computers can produce small rounding errors with everyday decimals. Use this tool to check homework, understand floating-point behaviour, or learn how binary fractions are built bit by bit.
1. Decimal to Binary
2. Binary to Decimal
Decimal to Binary Breakdown
Binary to Decimal Breakdown
Step-by-Step: Decimal Fraction to Binary (Repeated Multiplication by 2)
Steps will appear here after you enter a decimal number with a fractional part.
Step-by-Step: Binary Fraction to Decimal (Positional Weights)
Steps will appear here after you enter a binary number with a fractional part.
How Binary Fractions Work
In binary (base 2), the digit positions to the left of the binary point represent positive powers of 2 (1, 2, 4, 8, ...) and positions to the right represent negative powers of 2 (1/2, 1/4, 1/8, 1/16, ...). This is directly analogous to how decimal fractions work, except the base is 2 instead of 10.
For example, the binary number 110.101 means:
- 1 x 22 = 4
- 1 x 21 = 2
- 0 x 20 = 0
- 1 x 2-1 = 0.5
- 0 x 2-2 = 0
- 1 x 2-3 = 0.125
Total: 4 + 2 + 0 + 0.5 + 0 + 0.125 = 6.625
Converting Decimal Fractions to Binary
The integer part of a decimal number is converted to binary using the standard repeated division by 2 method. The fractional part is converted separately using repeated multiplication by 2:
- Multiply the fractional part by 2.
- The integer part of the result (0 or 1) becomes the next binary digit after the point.
- Keep only the new fractional part and repeat.
- Stop when the fractional part reaches 0 (exact result) or you have reached your required precision.
Worked Example: 6.625 to Binary
Integer part 6: 6 / 2 = 3 remainder 0, 3 / 2 = 1 remainder 1, 1 / 2 = 0 remainder 1. Reading remainders upward: 110.
Fractional part 0.625:
| Step | Calculation | Integer (bit) | Remaining fraction |
|---|---|---|---|
| 1 | 0.625 x 2 = 1.25 | 1 | 0.25 |
| 2 | 0.25 x 2 = 0.5 | 0 | 0.5 |
| 3 | 0.5 x 2 = 1.0 | 1 | 0 (exact) |
Binary fraction: .101. Combined result: 110.101
When Exact Conversion is Not Possible
Only decimal fractions whose denominator is a power of 2 convert exactly to binary. Common exact examples include 0.5 (= 1/2 = 0.1 in binary), 0.25 (= 1/4 = 0.01), 0.125 (= 1/8 = 0.001), and 0.75 (= 3/4 = 0.11). Fractions such as 0.1, 0.2, and 0.3 produce infinitely repeating binary sequences. This converter caps output at 32 fractional bits and notes when the result is approximate.
Common Reference Values
| Decimal | Binary | Exact? |
|---|---|---|
| 0.5 | 0.1 | Yes |
| 0.25 | 0.01 | Yes |
| 0.125 | 0.001 | Yes |
| 0.75 | 0.11 | Yes |
| 0.625 | 0.101 | Yes |
| 0.1 | 0.0001100110011... (repeating) | No |
| 0.3 | 0.0100110011... (repeating) | No |
| 6.625 | 110.101 | Yes |
Related Calculators
- Essential Calculators: browse all converters and digital tools.
- Binary Converter: convert whole integers between binary, decimal, hex, and octal.
- Decimal to Binary Calculator: convert whole decimal integers to binary.
- Binary, Hex, Octal and Decimal Converter: multi-base integer converter.
- Decimal to Fraction Calculator: express a decimal as a simplified fraction.
Method: Decimal integer parts are converted to binary by repeated division by 2 (collecting remainders). Decimal fractional parts are converted by repeated multiplication by 2 (collecting integer parts). Binary numbers are converted to decimal using positional weights: each bit at position n after the binary point contributes bit x 2-n. The converter applies up to 32 fractional bits and flags results that are truncated rather than exact.
This converter is provided for educational and practical use. Repeating binary fractions are shown to the selected precision and flagged as approximate. For integer-only binary conversions, use the Binary Converter or Decimal to Binary Calculator.