What does (a + b) mod n mean?
( ( a + b) mod n) means that there is an integer k such that 0 ? a + b ? n k < n, and ( a mod n) + ( b mod n) means there are integers k 1 and k 2 such that 0 ? a ? n k 1 < n and 0 ? b ? n k 2 < n ? 0 ? a + b ? n ( k 1 + k 2) < 2 n which has no relation to the 0 ? a + b ? n k < n especially resulting same numbers to say they are equal.
Why is a mod b not a remainder?
It is because a mod b isn't simply the remainder as returned by the operator '%'. See some examples: There are some other definitions in math and other implementations in computer science according to the programming language and the computer hardware. Please see Modulo operation from Wikipedia.
Is (a + b) always an integer?
Let us say ‘a’ and ‘b’ are two integers, either positive or negative. When we add the two integers, their result would always be an integer, i.e (a + b) would always be an integer.
What is the answer to a*b (mod 10)?
So to find the answer to "A*B (mod 10)" all you need to do is find: "the one's place of A" and "the one's place of B" Similarly, if you instead used base N instead of base 10 to write out your numbers A and B, you'd find the exact same pattern.