4 | 8 | 7 | 1 | 0 | :8 | |
8 | 0 | 3 | 7 | 2 | ||
-4 | 0 | -12 | -28 | |||
3 | 31 | 58 | 0 | |||
1 | 0 | 3 | 7 | 0 | ||
Quotient | Remainder |
Case 1 : Division of a number with a flag of one digit (no remainder)
Steps:
1.) Place a colon one digit from right (= number of digits of flag).
2.) Divide 8 by 8 to get quotient as 1 and remainder as o.Carry the remainder 0 to the next digit 7 and get 7 ( called gross dividend, GD).
3.) Multiply the quotient 1 by the flag 4 to get 4 and subtract it from 7 to get 3 (called net dividend, ND).
4.) Divide 3 by 8 to get quotient as 0 and remainder as 3.
5.) Carry the remainder 3 to the next digit and get 31 as GD.
6.) Multiply the quotient 0 by the flag 4 to get 0 and subtract it from 31 to get 31 as ND.
7.) Divide 31 by 8 to get quotient as 3 and remainder as 7.
8.) Carry the remainder 7 to the next digit 0 and get 70.
9.) Multiply the quotient 3 by the flag 4 to get 12 and substract it from 70 to get 58.
10.) Divide 58 by 8 to get the quotient as 7 and reaminder as 2.
11.) At this point we have obtained the integer part of the final quotient as we have reached the colon.All the balance digits would be the decimal part.
12.) Carry the remainder 2 to the next digit 8 and get 28.
13.) Multiply the quotient 7 by flag 4 to get 28 and substract it from 28 to get 0.
14.) Since the difference is now 0 the division is completed and we get the answer as 1037.