Skip to main content
Select Source:

modular arithmetic

modular arithmetic (residue arithmetic) 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 nr1 (mod m1) nr2 (mod m2) … nrk (mod mk)

Provided n is less than m1 × m2 × … × mk

n can be represented by (r1,r2,…,rk)

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. (r1,…,rk) + (s1,…,sk) = (r1 + s1, …, rk + sk)

Determining the sign of an integer or comparing relative magnitudes are less straightforward.

Cite this article
Pick a style below, and copy the text for your bibliography.

  • MLA
  • Chicago
  • APA

"modular arithmetic." A Dictionary of Computing. . Encyclopedia.com. 22 Aug. 2017 <http://www.encyclopedia.com>.

"modular arithmetic." A Dictionary of Computing. . Encyclopedia.com. (August 22, 2017). http://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/modular-arithmetic

"modular arithmetic." A Dictionary of Computing. . Retrieved August 22, 2017 from Encyclopedia.com: http://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/modular-arithmetic

residue arithmetic

residue arithmetic Another name for modular arithmetic.

Cite this article
Pick a style below, and copy the text for your bibliography.

  • MLA
  • Chicago
  • APA

"residue arithmetic." A Dictionary of Computing. . Encyclopedia.com. 22 Aug. 2017 <http://www.encyclopedia.com>.

"residue arithmetic." A Dictionary of Computing. . Encyclopedia.com. (August 22, 2017). http://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/residue-arithmetic

"residue arithmetic." A Dictionary of Computing. . Retrieved August 22, 2017 from Encyclopedia.com: http://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/residue-arithmetic