Binary Division Calculator
Divide binary numbers with step-by-step long division. Supports fractional results, arbitrary-length operands, and detailed remainder tracking.
About
Binary division follows the same shift-and-subtract algorithm as decimal long division, but operates in base-2 where each partial remainder is compared against the divisor with only two possible outcomes: 0 (divisor does not fit) or 1 (divisor fits). An error in any single bit propagates through all subsequent quotient digits, making manual computation surprisingly fragile for operands longer than 8 bits. This calculator performs exact arbitrary-length binary long division and renders every intermediate subtraction step so you can audit the process or use it as a learning reference.
The tool handles both integer and fractional binary inputs (e.g., 101.112). When the division does not terminate, it computes up to a configurable precision of fractional quotient bits and reports the remainder. Note: the algorithm assumes unsigned (non-negative) binary operands. For signed representations (two's complement, sign-magnitude), convert to unsigned magnitude first and apply the sign rule separately.
Formulas
Binary long division computes quotient Q and remainder R from dividend N and divisor D such that:
where 0 โค R < D.
The shift-and-subtract algorithm processes one bit at a time from the most significant bit of N:
At each step i, the partial remainder R is left-shifted by one bit and the next bit of N is appended. The comparison R โฅ D in binary reduces to checking whether the current partial remainder string is lexicographically and numerically greater than or equal to D. Binary subtraction uses the standard borrow-propagation rule: 0 โ 1 borrows from the next higher bit, yielding 102 โ 1 = 1.
Where N = dividend (binary), D = divisor (binary), Q = quotient, R = remainder, Qi = the i-th quotient bit.
Reference Data
| Decimal | Binary | Hex | Octal | Bit Count |
|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 | 2 |
| 4 | 100 | 4 | 4 | 3 |
| 8 | 1000 | 8 | 10 | 4 |
| 10 | 1010 | A | 12 | 4 |
| 16 | 10000 | 10 | 20 | 5 |
| 32 | 100000 | 20 | 40 | 6 |
| 64 | 1000000 | 40 | 100 | 7 |
| 100 | 1100100 | 64 | 144 | 7 |
| 128 | 10000000 | 80 | 200 | 8 |
| 255 | 11111111 | FF | 377 | 8 |
| 256 | 100000000 | 100 | 400 | 9 |
| 512 | 1000000000 | 200 | 1000 | 10 |
| 1000 | 1111101000 | 3E8 | 1750 | 10 |
| 1024 | 10000000000 | 400 | 2000 | 11 |
| 2048 | 100000000000 | 800 | 4000 | 12 |
| 4096 | 1000000000000 | 1000 | 10000 | 13 |
| 8192 | 10000000000000 | 2000 | 20000 | 14 |
| 16384 | 100000000000000 | 4000 | 40000 | 15 |
| 65535 | 1111111111111111 | FFFF | 177777 | 16 |