Binary Long Division Method Explained
Binary long division is the standard mathematical procedure used to divide numbers in base-2, operating on the same fundamental principles as decimal long division but with much simpler arithmetic. Because the binary system contains only the digits 0 and 1, determining the quotient at each step requires only comparison and subtraction rather than trial multiplication. This article outlines the step-by-step pencil-and-paper method used for binary division, followed by how this logic translates to computer hardware algorithms.
The Standard Paper-and-Pencil Method
The standard method for binary long division involves four repeating operations: compare, place quotient bit, subtract, and bring down.
- Setup: Write the divisor to the left and the dividend under the division bracket.
- Compare: Look at the leftmost bits of the dividend. Determine if this segment is greater than or equal to the divisor.
- Determine the Quotient Bit:
- If the dividend segment is greater than or equal to
the divisor, write a
1in the quotient above the current column. - If the dividend segment is smaller than the
divisor, write a
0in the quotient.
- If the dividend segment is greater than or equal to
the divisor, write a
- Subtract: If the quotient bit is
1, subtract the divisor from the current dividend segment using binary subtraction rules (\(1 - 0 = 1\), \(1 - 1 = 0\), and \(0 - 1 = 1\) with a borrow). If the quotient bit is0, skip subtraction. - Bring Down: Bring down the next bit of the dividend to the right of the current remainder.
- Repeat: Repeat the process until all bits of the dividend have been processed. The final value at the bottom is the remainder.
Step-by-Step Example
Problem: Divide \(1101_2\) (13 in decimal) by \(11_2\) (3 in decimal).
- Compare First Two Bits: The divisor is two bits
long (
11). Compare it with the first two bits of the dividend (11).- Since \(11_2 \ge 11_2\), the first
quotient bit is
1. - Subtract: \(11_2 - 11_2 = 0\).
- Since \(11_2 \ge 11_2\), the first
quotient bit is
- Bring Down Next Bit: Bring down the next digit
(
0), making the current segment00.- Compare: \(00_2 < 11_2\), so the
next quotient bit is
0.
- Compare: \(00_2 < 11_2\), so the
next quotient bit is
- Bring Down Next Bit: Bring down the final digit
(
1), making the current segment01.- Compare: \(01_2 < 11_2\), so the
final quotient bit is
0.
- Compare: \(01_2 < 11_2\), so the
final quotient bit is
Result: * Quotient: \(100_2\) (4 in decimal) * Remainder: \(1_2\) (1 in decimal)
Checking with decimal values: \(13 \div 3 = 4\) with a remainder of \(1\).
Hardware Implementation Methods
In computer processors, binary long division is automated using digital circuits through specialized division algorithms:
- Restoring Division: The circuit subtracts the
divisor from the dividend register at each cycle. If the result is
negative, it sets the quotient bit to
0and adds the divisor back (restores the original value) before shifting. - Non-Restoring Division: Avoids the restoration step by leaving the negative result in place and adding the divisor in the subsequent cycle instead of subtracting, significantly increasing execution speed.
- SRT Division: A fast hardware method utilizing redundant representations and lookup tables to guess multiple quotient bits per cycle without performing full subtractions.