What does $(4 \mod 100) \equiv (5 \mod 99)$ mean

arithmeticelementary-number-theorymodular arithmetic

I came across the following example on page 9 of Introduction to Arithmetic for Digital Systems by Waser and Flynn:

Example 1.5

Suppose we have two $\mod 99$ $A'$ and $B'$, having the following operations performed $\mod 100$, and then corrected to $\mod 100$ and then to a $\mod 99$ result?

(i) $A' = 47$, $B' = 24$; find $(A' + B') \mod 99$.

    47
   +24
  -----
   071    71 mod 100 ≡ 71 mod 99 = result

(ii) $A' = 47$, $B' = 57$; find $(A' + B') \mod 99$.

    47
   +57
  -----
   104    4 mod 100 ≡ 5 mod 99 = result
    +1
  -----
    05

(iii) $A' = 47$, $B' = 52$; find $(A' + B') \mod 99$.

    47
   +52
  -----
   099    99 mod 100 ≡ 0 mod 99 = result

Could someone please help me understand why $4 \mod 100 \equiv 5 \mod 99$?

I know that $N \mod \mu \equiv M \mod \mu$, iff there exists an integer $K$ such that $N – M = K\mu$, but I don't know how to interpret congruence between two different moduli.

Best Answer

Looks like a typographical error as well as some pretty rubbish notation ($=$ result?? No thanks).

There's two conventional (and closely related) ways of interpreting mod. One is as an equivalence relation (congruence mod m) which is kind of how you have written it: $$ a \equiv b \text{ mod } m \quad \text{if $m|(a-b)$} $$ (here, think of 'mod' as being attached to the relation $\equiv$, rather than either of the numbers).

The other way is as an operator on a number, that is $ a \text{ mod } m = b$ where $b$ is the unique number such that $m|(a-b)$ and $0\leq b \leq m-1$. That's how this text is using it (but in that case it is confusing that they use $\equiv$). Note however that in that case $$ 5 \text{ mod } 100 = 5 \text{ mod } 99 \neq 4 \text{ mod } 99. $$ (They do this correctly in the other examples).

Related Question