<s>
A	O
residue	B-Architecture
numeral	I-Architecture
system	I-Architecture
(	O
RNS	O
)	O
is	O
a	O
numeral	O
system	O
representing	O
integers	O
by	O
their	O
values	O
modulo	O
several	O
pairwise	O
coprime	O
integers	O
called	O
the	O
moduli	O
.	O
</s>
<s>
The	O
arithmetic	O
of	O
a	O
residue	B-Architecture
numeral	I-Architecture
system	I-Architecture
is	O
also	O
called	O
multi-modular	B-Architecture
arithmetic	I-Architecture
.	O
</s>
<s>
Multi-modular	B-Architecture
arithmetic	I-Architecture
is	O
widely	O
used	O
for	O
computation	O
with	O
large	O
integers	O
,	O
typically	O
in	O
linear	B-Language
algebra	I-Language
,	O
because	O
it	O
provides	O
faster	O
computation	O
than	O
with	O
the	O
usual	O
numeral	O
systems	O
,	O
even	O
when	O
the	O
time	O
for	O
converting	O
between	O
numeral	O
systems	O
is	O
taken	O
into	O
account	O
.	O
</s>
<s>
Other	O
applications	O
of	O
multi-modular	B-Architecture
arithmetic	I-Architecture
include	O
polynomial	O
greatest	O
common	O
divisor	O
,	O
Gröbner	O
basis	O
computation	O
and	O
cryptography	O
.	O
</s>
<s>
Residue	B-Architecture
number	I-Architecture
systems	I-Architecture
have	O
been	O
defined	O
for	O
non-coprime	O
moduli	O
,	O
but	O
are	O
not	O
commonly	O
used	O
because	O
of	O
worse	O
properties	O
.	O
</s>
<s>
Two	O
integers	O
whose	O
difference	O
is	O
a	O
multiple	O
of	O
have	O
the	O
same	O
representation	O
in	O
the	O
residue	B-Architecture
numeral	I-Architecture
system	I-Architecture
defined	O
by	O
the	O
s	O
.	O
More	O
precisely	O
,	O
the	O
Chinese	O
remainder	O
theorem	O
asserts	O
that	O
each	O
of	O
the	O
different	O
sets	O
of	O
possible	O
residues	O
represents	O
exactly	O
one	O
residue	O
class	O
modulo	O
.	O
</s>
<s>
For	O
adding	O
,	O
subtracting	O
and	O
multiplying	O
numbers	O
represented	O
in	O
a	O
residue	B-Architecture
number	I-Architecture
system	I-Architecture
,	O
it	O
suffices	O
to	O
perform	O
the	O
same	O
modular	O
operation	O
on	O
each	O
pair	O
of	O
residues	O
.	O
</s>
<s>
It	O
may	O
be	O
applied	O
at	O
the	O
end	O
of	O
the	O
computation	O
,	O
or	O
,	O
during	O
the	O
computation	O
,	O
for	O
avoiding	O
overflow	B-Error_Name
of	O
hardware	O
operations	O
.	O
</s>
<s>
However	O
,	O
operations	O
such	O
as	O
magnitude	O
comparison	O
,	O
sign	O
computation	O
,	O
overflow	B-Error_Name
detection	O
,	O
scaling	O
,	O
and	O
division	O
are	O
difficult	O
to	O
perform	O
in	O
a	O
residue	B-Architecture
number	I-Architecture
system	I-Architecture
.	O
</s>
<s>
Division	O
in	O
residue	B-Architecture
numeral	I-Architecture
systems	I-Architecture
is	O
problematic	O
.	O
</s>
<s>
RNS	O
have	O
applications	O
in	O
the	O
field	O
of	O
digital	B-General_Concept
computer	O
arithmetic	O
.	O
</s>
