quotientdivisor\encloselongdivdividend0…0remainder→divisordividend=quotient+divisorremainder
- Identify the shortest initial sequence of digits d from the dividend (starting from the left) such that d≥divisor.
- Compute q=⌊divisord⌋ and write q above the rightmost digit of d (on the quotient line).
- Write r=d−(divisor×q) below the rightmost digit of d.
- Bring down the next digit of the dividend (if any) to the right of r, forming a new number, which becomes the new d.
- Repeat steps 2–4 until all digits of the dividend have been processed.
- The final r after the last step is the remainder, and the concatenation of all q values forms the quotient.