Arithmetic based on the concept of the congruence relation defined on the integers and used in computing to circumvent the problem of performing arithmetic on very large numbers.
Let m1, m2,…, mk be integers, no two of which have a common factor greater than one. Given a large positive integer n it is possible to compute the remainders or residues r1, r2,…, rk such that
Provided
n is less than
n can be represented by
This can be regarded as an internal representation of
n. Addition, subtraction, and multiplication of two large numbers then involves the addition, subtraction, and multiplication of corresponding pairs, e.g.
Determining the sign of an integer or comparing relative magnitudes are less straightforward.