Modular arithmetic
Jump to Section
- \(x \equiv y (\text{mod} : n) \leftrightarrow (x-y) : \text {mod} : n = 0\)
Addition Tables
- Z mod 4
+ 0 1 2 3 0 \((0 + 0) \mod 4 = 0\) 1 2 3 1 \((1 + 0) \mod 4 = 1\) 2 3 0 2 \((2 + 0) \mod 4 = 1\) 3 0 1 3 \((3 + 0) \mod 4 = 3\) 0 1 2
Multiplication tables
- Z mod 4
x 0 1 2 3 0 \((0 \cdot 0) \mod 4 = 0\) 0 0 0 1 \((1 \cdot 0) \mod 4 = 0\) 1 2 3 2 \((2 \cdot 0) \mod 4 = 0\) 2 0 2 3 \((3 \cdot 0) \mod 4 = 0\) 3 2 1