The system of residual classes (SOC) ( born residue number system ) is a number system based on modular arithmetic .
The representation of a number in the system of residual classes is based on the concept of deduction and the Chinese remainder theorem . RMS is determined by a set of pairs of mutually simple modules. that is, such that called basis and product so that every integer from the segment set of deductions matched where
Moreover, the Chinese theorem on residuals guarantees the uniqueness (uniqueness) of the representation of non-negative integers from the segment .
Content
Benefits of the residual class system
In the SOC the arithmetic operations (addition, subtraction, multiplication, division) are performed componentwise, if the result is known that it is integer and also lies in .
Formula for addition: where
Similarly, subtraction, multiplication and division are performed. Note : the division imposes additional restrictions. The division must be integer, that is, the divisor must completely divide the dividend. The divider must be mutually simple with all modules of the basis.
Disadvantages of the residual class system
- lack of efficient algorithms for comparing numbers; Usually, the comparison is carried out by transferring the arguments from the RNS to the number system (polyadic) with mixed bases: ;
- slow algorithms for the mutual conversion of the representation of numbers from the positional number system to the SOC and vice versa;
- complex division algorithms (when the result is not integer);
- difficulty in detecting overflow.
Application of residual class system
JUICE is widely used in microelectronics in specialized DSP devices where it is required:
- error control due to the introduction of additional redundant modules;
- high speed of work, which provides a parallel implementation of the basic arithmetic operations;
- information security .
Practical application: Czechoslovak tube EPOS computer , Soviet military multiprocessor supercomputer 5E53 , designed to solve the missile defense tasks.
Special module systems
In modular arithmetic, there are special sets of modules that allow you to partially level the flaws and for which there are effective algorithms for comparing numbers and for the direct and reverse translation of modular numbers into a positional number system. One of the most popular module systems is a set of three pairwise mutually simple numbers of the form {2 n −1, 2 n , 2 n +1} .
Example
Consider a SOC with basis . In this basis, one can represent numbers from the interval from before , because . Table of correspondence of numbers from the positional number system and the residual class system
Addition Example
Add two numbers 9 and 14 in basis . Their representation in a given basis and (see plate above). We use the formula for addition:
- according to the table we are convinced that the result is equal to 23.
Multiplication Example
Multiply two numbers 4 and 5 in the basis . Their representation in a given basis and (see plate above). We use the formula for multiplication:
- according to the table we are convinced that the result is equal to 20.
Note: if we multiplied or added the numbers that gave a multiplication number greater than or equal then the result where - the result of the operation in the positional number system.
Example of division, provided that the division is entirely
The division can be performed in the same way as multiplication, but only if the divisor divides the dividend completely, without a remainder.
For modules divide the number 1872 by 9.
Divide on .
We use the formula
Here I must say that that is not the same thing as simply sharing on .
According to the formula we get:
This is the correct result - the number 208. However, this result can be obtained only if it is known that the division is made without a remainder.
See also
- Modulo comparison
- Chinese remainder theorem
Literature
- Akushsky I.Ya. , Yuditsky D.I. Machine arithmetic in residual classes . - Owls. Radio , 1968. - 439 p.
- Torgashev, Valery Antonovich. System of residual classes and reliability of digital computers . - M .: Owls. Radio , 1973. - 118 p.
- Amerbayev V.M. Theoretical foundations of machine arithmetic . - Academy of Sciences of the Kazakh SSR, Institute of Mathematics and Mechanics. Alma-Ata: Science , 1976. - 324 p.
- O. Finko. Modular arithmetic of parallel logical calculations : monograph - Moscow : Institute of Control Sciences , Russian Academy of Sciences , 2003. - 214 p.
- Jubilee International Scientific and Technical Conference "50 years of modular arithmetic . " - JSC Angstrem , MIET . - November 23-25, 2005; Moscow, Zelenograd: FIZMATLIT , 2006. - 775 p. - ISBN ISBN 5-7256-0409-8 .
- Amos Omondi, Benjamin Premkumar. Residue Number Systems: Theory and Implementation . - 57 Shelton Street Covent Garden London: Imperial College Press , 2007. - 296 p. - ISBN 978-1-86094-866-4 .
- Chervyakov N. I., Evdokimov A. A., Galushkin A. I. , Lavrinenko I.N. and others. The use of artificial neural networks and the system of residual classes in cryptography . - M .: FIZMATLIT , 2012. - 280 p. - ISBN 978-5-9221-1386-1 .
- Ananda Mohan, PV Residue Number Systems. - Cham: Springer International Publishing , 2016. - 351 p. - ISBN 978-3-319-41385-3 .
- Amir Sabbagh, Molahosseini, Leonel Seabra de Sousa, and Chip-Hong Chang (editors). Embedded Systems Design with Special Arithmetic and Number Systems. - Cham: Springer International Publishing , 21 March 2017. - 389 p. - ISBN 978-3-319-49742-6 .