Binary Fraction Calculator — Decimal ↔ Binary Conversion
Convert a decimal number (like 0.625 or 5.75) to its binary fraction equivalent, or convert a binary fraction (like 0.1011) back to decimal. Choose the direction, enter your value, and see a step-by-step trace.
Conversion direction
bits
Binary: 0.101
Step 1: 0.625 × 2 = 1.25
Step 2: 0.25 × 2 = 0.5
Step 3: 0.5 × 2 = 1
Binary result
How does this calculator work?
To convert a decimal fraction to binary, multiply the fractional part by 2 repeatedly and collect the integer parts as binary bits — stop when the fraction reaches 0 (exact) or you have enough bits. To go the other way, sum 1/2^i for each 1-bit at fractional position i. Enter a value above to see the step-by-step conversion in both directions.
Formula
How this is calculated
To convert a decimal fraction to binary, separate the integer and fractional parts. The integer part converts by standard repeated division by 2. For the fractional part, the algorithm multiplies by 2 at each step: the integer portion of the result (0 or 1) becomes the next binary bit, and the remaining fractional part is fed into the next iteration. Repeating this up to the desired precision builds the binary fraction bit by bit from the most significant fractional position downward. If the fractional part ever becomes exactly 0, the representation is exact (the decimal is a sum of negative powers of 2); otherwise the binary representation is repeating.
To convert from binary to decimal, each bit at fractional position i contributes bit_i × 2^(−i): the first fractional bit is worth 1/2, the second 1/4, the third 1/8, and so on. Summing all non-zero bit contributions gives the decimal value.
Not all decimal fractions have a finite binary representation — for example, 0.1 in decimal is 0.0001100110011…₂, an infinite repeating pattern (like 1/3 in decimal). The calculator shows a truncated approximation up to the chosen number of fractional bits and flags non-exact results.
Frequently asked questions
0.1 is not a sum of any finite set of negative powers of 2, so it has an infinitely repeating binary expansion (0.00011001100110011…₂), just as 1/3 cannot be written as a finite decimal. This is why floating-point arithmetic in computers introduces small rounding errors.
Only decimals that are sums of negative powers of 2 have exact binary representations. These include 0.5 (= 1/2 = 0.1₂), 0.25 (= 1/4 = 0.01₂), 0.625 (= 1/2 + 1/8 = 0.101₂), and any finite combination of such terms.
0.1011₂ = 1×(1/2) + 0×(1/4) + 1×(1/8) + 1×(1/16) = 0.5 + 0 + 0.125 + 0.0625 = 0.6875.
Also known as
TG we-Calculate Editorial Team. (2026). Binary Fraction Calculator — Decimal ↔ Binary Conversion [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/binary-fraction-calculator
TG we-Calculate Editorial Team. "Binary Fraction Calculator — Decimal ↔ Binary Conversion." TG we-Calculate. 2026. https://we-calculate.com/calculator/binary-fraction-calculator.
TG we-Calculate Editorial Team, "Binary Fraction Calculator — Decimal ↔ Binary Conversion," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/binary-fraction-calculator
@misc{wecalculate_binary_fraction_calculator, title = {Binary Fraction Calculator — Decimal ↔ Binary Conversion}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/binary-fraction-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
