Explanation
Flag Division by Any 2-Digit Number (Dhvajanka)
Split the divisor. Twenty-three: the first digit, two, is the operator we divide by.
The last digit, three, goes up on the flag. One digit on the flag means one digit of the dividend goes to the remainder side.
23 → operator 2, flag 3 · 7452 → 745 · 2
7 ÷ 2 = 3 rem 1
Divide the first digit by the operator. Seven divided by two: three, remainder one.
Write three in the quotient, and put the remainder in front of the next digit: fourteen.
7 ÷ 2 = 3 rem 1 → quotient 3; the 1 joins the next digit → 14
14 − flag × last quotient digit = 14 − 3 × 3 = 5
Before dividing again, subtract the flag times the last quotient digit. Fourteen minus nine is five.
Five divided by two: two, remainder one. The next number is fifteen.
14 − flag × last quotient digit = 14 − 3 × 3 = 5 → 5 ÷ 2 = 2 rem 1 → 15
15 − 3 × 2 = 9
Fifteen minus six is nine. Nine divided by two: four, remainder one.
Twelve is now on the remainder side.
15 − 3 × 2 = 9 → 9 ÷ 2 = 4 rem 1 → 12
Remainder side
On the remainder side, just subtract: twelve minus twelve is zero. Seven four five two divided by twenty-three is exactly three twenty-four.
Remainder side: 12 − 3 × 4 = 0 → 7452 ÷ 23 = 324
If a subtraction goes negative, lower the last…
If a subtraction ever goes negative, the last quotient digit was too big. Lower it by one, carry the bigger remainder, and try again.
Red card: if a subtraction goes negative, lower the last quotient digit by 1 and redo
Worked example
5129 ÷ 21 (operator 2, flag 1): 5 ÷ 2 = 2 r1 → 11 − 1 × 2 = 9 → 9 ÷ 2 = 4 r1 → 12 − 4 = 8 → 8 ÷ 2 = 4 r0 → remainder side 09 − 4 = 5. Quotient 244, remainder 5.
Check: 21 × 244 = 5124, and 5124 + 5 = 5129.