Binary Division Calculator

Divide two binary numbers using the long-division (shift-and-subtract) algorithm and see the quotient and remainder in both binary and decimal.

Quick Facts

Method
Restoring binary long division
Same shift-and-subtract process as decimal long division, but every quotient digit is 0 or 1.
Verify by hand
quotient × divisor + remainder = dividend
This identity holds for every valid division and is the fastest way to check a result.
Shortcut
Dividing by 2ⁿ = shift right n bits
The bits shifted out are exactly the remainder.

Your Results

Calculated
Quotient (binary)
-
Dividend ÷ divisor
Remainder (binary)
-
What's left after division
Quotient (decimal)
-
Same value in base 10
Remainder (decimal)
-
Same value in base 10

Ready

Enter a dividend and divisor in binary, then press Calculate.

How Binary Division Works

Binary division follows the same long-division method taught for decimal numbers, restricted to a base of 2 instead of base 10. Given a dividend and a nonzero divisor, both written in binary, the goal is to find a quotient and a remainder such that quotient × divisor + remainder = dividend, with the remainder always smaller than the divisor. Because binary digits are only 0 or 1, every quotient digit produced by the algorithm is also just 0 or 1 — there is no multiplication table to memorize, only "does the divisor fit or not."

The shift-and-subtract algorithm

Working from the most significant bit of the dividend to the least significant bit, the algorithm keeps a running remainder: bring down the next bit of the dividend and append it to the remainder, then compare the remainder to the divisor. If the remainder is greater than or equal to the divisor, subtract the divisor from it and record a quotient bit of 1; otherwise record a quotient bit of 0 and leave the remainder unchanged. After every bit of the dividend has been brought down, the quotient bits collected in order form the binary quotient, and whatever is left in the running remainder is the binary remainder. This calculator applies that method internally (equivalently, it computes floor(dividend ÷ divisor) and dividend mod divisor in integer arithmetic, which always agrees with the bit-by-bit result) and converts the quotient and remainder back to binary.

Common sources of error

  • Reading digits as decimal: a binary string like 1010 is ten in decimal, not "one thousand and ten" — treat each position as a power of 2, not a power of 10.
  • Losing track of bit position: misaligning the running remainder against the divisor during long division produces the wrong quotient bit; keep the divisor right-aligned with the current remainder at every step.
  • Leading zeros: "0011" and "11" represent the same value (three); leading zeros don't change the result but can make it harder to compare bit widths at a glance.
  • Dividing by zero: a divisor of all zeros (0, 00, 000...) is undefined, exactly as in decimal arithmetic, and this calculator will reject it.

Checking your result

The fastest sanity check is the division identity itself: multiply the quotient by the divisor and add the remainder — the result must equal the original dividend exactly. It also helps to convert everything to decimal and confirm the same relationship holds there, since binary and decimal division of the same numbers always agree.

Applications

Binary division underlies integer division in computer processors (ALUs), fixed-point and floating-point division routines, computing remainders for hashing and checksums, and converting binary fractions. It's also a standard exercise in computer science and digital logic courses for understanding how arithmetic circuits implement division from simpler shift and subtract operations.

Frequently Asked Questions

How does binary long division work?
It follows the same shift-and-subtract process as decimal long division, but each quotient digit is only 0 or 1. Starting from the leftmost bit of the dividend, bring down bits to form a running remainder; whenever that remainder is greater than or equal to the divisor, subtract the divisor and record a quotient bit of 1, otherwise record 0 and bring down the next bit.
What does the remainder mean in binary division?
The remainder is what's left over after subtracting the divisor as many whole times as possible. It always satisfies quotient × divisor + remainder = dividend, and it's always smaller than the divisor. A remainder of 0 means the division is exact.
Is dividing by 2 in binary just a bit shift?
Yes. Dividing an unsigned binary number by 2 (binary 10) is equivalent to shifting every bit one place to the right; the bit shifted out is the remainder. Dividing by 2ⁿ is a right shift of n bits, which is why binary division by powers of two is so cheap for computers to perform.
What happens if the divisor is zero?
Division by zero is undefined in binary just as it is in decimal. This calculator rejects a divisor of all zeros and asks for a nonzero binary value instead of returning a result.