Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Floored rule: always round down, even below zero, so the remainder gets the sign of n
Find the remainder r: take q lots of n away from a, and what's left is the answer
2. a mod n (remainder): 3
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Euclidean rule: pick q so the remainder is never negative. Round a ÷ |n| down (|n| is n without its sign), then give q the sign of n
Find the remainder r: take q lots of n away from a, and what's left is the answer
3. a mod n (remainder): 4
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Floored rule: always round down, even below zero, so the remainder gets the sign of n
Find the remainder r: take q lots of n away from a, and what's left is the answer
4. a mod n (remainder): 2
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Truncated rule: chop off the decimal part, rounding toward zero, so the remainder gets the sign of a
Find the remainder r: take q lots of n away from a, and what's left is the answer
5. a mod n (remainder): 3
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Truncated rule: chop off the decimal part, rounding toward zero, so the remainder gets the sign of a
Find the remainder r: take q lots of n away from a, and what's left is the answer
6. a mod n (remainder): 2
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Truncated rule: chop off the decimal part, rounding toward zero, so the remainder gets the sign of a
Find the remainder r: take q lots of n away from a, and what's left is the answer
7. a mod n (remainder): 3
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Truncated rule: chop off the decimal part, rounding toward zero, so the remainder gets the sign of a
Find the remainder r: take q lots of n away from a, and what's left is the answer
8. a mod n (remainder): 0
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Euclidean rule: pick q so the remainder is never negative. Round a ÷ |n| down (|n| is n without its sign), then give q the sign of n
Find the remainder r: take q lots of n away from a, and what's left is the answer
9. a mod n (remainder): 0
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Floored rule: always round down, even below zero, so the remainder gets the sign of n
Find the remainder r: take q lots of n away from a, and what's left is the answer
10. a mod n (remainder): 1
Write a as a whole number (q) of n's plus a leftover remainder (r). That leftover is the answer
Divide a by n to see roughly how many times n fits into a
Find the whole number of times n fits (q). Truncated rule: chop off the decimal part, rounding toward zero, so the remainder gets the sign of a
Find the remainder r: take q lots of n away from a, and what's left is the answer