Long division is a method of dividing one number by another. It is a way of finding the answer to a division problem. The answer is called the quotient.
Now let's see an example of long division in action.
Let's divide 125 by 5.
-------
5 | 1 2 5
This involves finding the context for each of this steps. For the first step we pick the first digit of the dividend.
context = 1
We will keep track of the result of each in the like this:
A = ?
A.1) Find the biggest number so that the divisor multiplied by it is less than or equal the context.
5 * [0] <= 1
A = 0
we write it as:
= 0
-------
5 | 1 2 5
A.2) Multiply the divisor by the result [A] and write the product below the context.
= 0
-------
5 | 1 2 5
- 0
A.3) Subtract the product from the dividend
= 0
-------
5 | 1 2 5
- 0
-----
1
A.4) Bring down the next digit and update the context with the new number. Go to step B.1.
context = 12
This gives us:
= 0
-------
5 | 1 2 5
- 0
-----
1 2
B.1) Find the biggest number so that the divisor multiplied by it is less than or equal the context.
5 * [2] <= 12
B = 2
This gives us:
= 0
-------
5 | 1 2 5
- 0
-----
1 2
B.2) Multiply the divisor by the result [B] and write the product below context.
= 0 2
-------
5 | 1 2 5
- 0
-----
1 2
- 1 0
B.3) Subtract the product from the dividend
= 0 2
-------
5 | 1 2 5
- 0
-----
1 2
- 1 0
-----
2
B.4) Bring down the next digit and update the context with the new number. Go to step C.1.
context = 25
This gives us:
= 0 2
-------
5 | 1 2 5
- 0
-----
1 2
- 1 0
-------
2 5
C.1. Find the biggest number so that the divisor multiplied by it is less than or equal the context.
5 * [5] <= 25
C = 5
This gives us:
= 0 2 5
-------
5 | 1 2 5
- 0
-----
1 2
- 1 0
-----
2 5
C.2. Multiply the divisor by the result [C] and write the product below the context.
= 0 2 5
-------
5 | 1 2 5
- 0
-----
1 2
- 1 0
-----
2 5
2 5
C.3. Subtract the product from the dividend
= 0 2 5
-------
5 | 1 2 5
- 0
-----
1 2
- 1 0
-----
2 5
- 2 5
-------
0
C.4. There are no more digits to bring down. The final result is the quotient: 125 ÷ 5 = 25 and the remainder is 0.
result = A and B and C = 025 = 25