The Analysis of the Methods of Data Diagnostic in a Residue Number System Victor Krasnobayev 1[0000-0001-5192-9918], Alexandr Kuznetsov 1[0000-0003-2331-6326], Alina Yanko 2[0000-0003-2876-9316] and Tetiana Kuznetsova 1[0000-0001-6154-7139] 1 V. N. Karazin Kharkiv National University, Svobody sq., 4, Kharkiv, 61022, Ukraine v.a.krasnobaev@gmail.com, kuznetsov@karazin.ua, kuznetsova.tatiana17@gmail.com 2 Poltava National Technical Yuri Kondratyuk University, Poltava, Ukraine al9_yanko@ukr.net Abstract. The article presents the results of the analysis of the methods of data diagnostic presented in residue number system (RNS). Two practical methods of data diagnostic in RNS are investigated. Their advantages and disadvantages are shown. The main disadvantage of these methods is the lack of the efficiency in data diagnostic in RNS. The third method of the efficient diagnostic in RNS, which eliminates the above-mentioned disadvantage, has been reviewed in the article. The usage of this method can significantly increase the efficiency of da- ta diagnostic in RNS. The main drawback of this method is a significant amount of equipment required to implement the process of data diagnostic in RNS. The method of the efficient diagnostic has been improved in terms of reducing the amount of equipment required for implementing the process of data diagnostic in RNS. The application of the improved method of the efficient diagnostics al- lows reducing the amount of equipment for the implementation of a diagnostic data procedure in RNS without increasing the diagnostic time. Examples of practical use of the improved method of data diagnostic in RNS are presented. Keywords: Alternative Set of Numbers; Data Diagnostic; Diagnostic Effi- ciency; Error Control and Correction; Residue Number System; Zeroisation Procedure. 1 Introduction Data diagnostic in residue number system (RNS) is the process of determining the distorted residues in redundant non-positional code structure (NCS) presented in the following form ARNS  a1 || a 2 || ... || ai 1 || ai || ... || a n || ... || a n  k  where n and k  are the number of, respectively, informational and control bases mi i  1, n  k of  ordered mi  mi 1  RNS. The diagnostic is carried out after data control, if it is nec- essary for the subsequent error correction. Some methods, algorithms and devices for data diagnostic in RNS have already been presented [1-3]. To monitor, diagnose and Copyright © 2020 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). correct errors, the certain information redundancy must be introduced. Power of the information redundancy, which as in positional number system (PNS), determines  RNS  the corrective abilities of the code, is estimated by the valued d min of a minimum code distance (MCD). In RNS the value of MCD is determined by the ratio  RNS  d min  k  1 [4-7]. For one control base, the value of MCD is equal to  RNS  d min  2 . In accordance with the general coding theory, in RNS with a minimum  RNS  code distance d min  2 the distortion of only one of the residues can be reliably established (one-time error) in NCS. For example, to correct a one-time error (in one residue) and determine double errors (in two residues) it is necessary to ensure that  RNS  d min  3 [1, 8-12]. Due to the influence of RNS properties on the data processing it is possible, in some cases, to correct one-time data errors (in one NCS residue) when introducing the minimal (k = 1) information code redundancy. So, the property of the independence of the residues of NCS allows us to correct not intermediate cal- culation results, but final one. A typical example for this case is the possibility of implementing the data error correction procedure with one control base without stop- ping the intermediate computing process (during the computational process). To im- plement such procedure, it becomes necessary to diagnose intermediate results of calculations based on the use of the concept of an alternative set of numbers (AS) in RNS [13-19]. The purpose of the article is to study the methods of data diagnostic, presented in non-positional residue number system with one control base. Main part. Let us consider the method of data diagnostic in RNS based on the concept of AS numbers in RNS. ~   The first method of diagnosis. The alternative set W A  ml , ml ,..., ml of in- 1 2 p  ~ correct number ARNS  a1 || a 2 || ... || ai 1 || a ~ || a || ... || a || a  can be deter- 1 i 1 n n 1   mined by a sequential testing of each base mi i  1, n RNS. We determine the set of ~ numbers, that have the same residues for all bases of RNS, as number A , except one certain residue (base), and differ only in values of possible residues on this base. In this set there may be no correct numbers or there may be only one correct number. In ~ the last case, the number is a part of AS of number A . The proposed method involves carrying out similar verifications for each of the in- formation base of RNS (a control base always is a part of a set of bases of AS). The result of such sequential verifications completely and reliably determines the AS ~    ~ W A  ml1 , ml2 ,..., ml p of the incorrect number A . The disadvantage of the me- thod is the low efficiency in determining AS. This is due to the considerable time of consecutive executions of data diagnostic stages in RNS. The second method of diagnosis. This method is also based on the determination ~  1 2 p  of AS W A  ml , ml ,..., ml . In this case, the whole procedure of diagnosing NCS is carried out by simultaneous and parallel calculation of all possible projections ~ A  a1 || a 2 || ... || ai 1 || ai 1 || ... || a n || a n 1  i RNS of the incorrect number ~ ARNS  a1 || a 2 || ... || ai 1 || a~l || a i 1 || ... || a n || a n 1  , and their subsequent compari- son with the value of M   n i 1 mi without the redundant numeric information interval ( information volume of code words ) 0  M  1 given in RNS. It is proved in [1, 7, 8], that the necessary and sufficient condition of the entry of the bases of RNS in AS ~   W A  ml , ml ,..., ml 1 of 2 number p  ~ ARNS  a1 || a 2 || ... || ai 1 || a~l || a i 1 || ... || a n || a n 1  is correctness of  A ~  M  i RNS   ~ for its projection A i RNS  a1 || a 2 || ... || ai 1 || ai 1 || ... || a n || a n 1  . Parallelization of the procedure of calculating all possible projections ~ Ai RNS  a1 || a 2 || ... || ai 1 || ai 1 || ... || a n || a n 1  of the incorrect number ~ ARNS  a1 || a 2 || ... || ai 1 || a~i || ai 1 || ... || a n || a n 1  reduces the time of AS deter- mination and increases the efficiency of diagnosing data in RNS. Let us consider the following example of data diagnostic based on the usage of the second method. ~ Example 1. Let us determine the AS of the number ARNS  0 || 0 || 0 || 0 || 5 , which is defined in RNS by the information m1  3 , m2  4 , m3  5 , m 4  7 and control bases mk  m5  11 . Wherein M   n i 1 mi   i41 mi  420 and the full range 0  M 0  1 of coded words equals to M 0  M  mn 1  420  11  4620 (Table 1). At first, the procedure of controlling number ARNS  0 || 0 || 0 || 0 || 5 is carried out by the known method [1, 18, 19]. According to the standard control procedure we determine the value of the original number in PNS. In the end of the control it is de- termined that APNS  3360  M  420 . In this case, assuming the occurrence of only one-time (in one residue number) errors, it can be concluded that the considered ~ number A3360  0 || 0 || 0 || 0 || 5 is incorrect, i.e., one of the number residues is dis- ~ torted. Then the procedure of determining AS A3360  0 || 0 || 0 || 0 || 5 is realized (Table 1). For the number ARNS  0 || 0 || 0 || 0 || 5 not distorted residues have been determined. They are a 2  0 and a 3  0 . The values of residues on the bases m1 , m4 and m5 , i.e., residues a1  0 , a 4  0 and a 5  5 may be incorrect. In this case, for the number ARNS  0 || 0 || 0 || 0 || 5 AS will be equal to the set of RNS ~  bases W A  m1 , m4 , m5  . Table 1. Table of code words A in A in RNS A in A in RNS PNS PNS 0 0 0 0 0 0 2310 1 1 1 1 1 1 2311 2 2 2 2 2 2 2312 3 0 3 3 3 3 2313 . . . . . . 418 2728 419 2729 420 2730 . . . . . 3360 0 0 0 0 5 . . . . 2308 4618 2309 4619 The use of the second method of data diagnostic in RNS allows us to speed up the process of determining AS ~   W A  ml , ml ,..., ml 1 of the num- 2 p  ~ ber ARNS  a1 || a 2 || ... || a i 1 || a ~ || a || ... || a || a  , due to the possibility of l i 1 n n 1 ~ parallel determination of projections Aj of incorrect number ~ ARNS  a1 || a 2 || ... || ai 1 || a~l || ai 1 || ... || a n || a n 1  . It should be noted, that for the second method the procedure of determining the number of AS includes such basic operations as transferring ~ ARNS  a1 || a 2 || ... || ai 1 || a~l || ai 1 || ... || a n || a n 1  from RNS to PNS; converting ~ projections A i RNS  a1 || a 2 || ... || ai 1 || ai 1 || ... || a n || a n 1  of the incorrect num- ~ ber ARNS from RNS to PNS and the operation of comparing them with the value M . In RNS the listed operations refer to non-positional operations, the implementation of which is very consuming both in time and hardware. The known methods of diagnosing in RNS have the common drawback, that is the low efficiency of data diagnostic. This reduces the effectiveness of RNS usage for rapid implementation of integer-valued operations. The third recent designed method of data diagnosis is presented in [2, 7, 8]. Its us- age allows increasing the efficiency of diagnosing in RNS. The essence of the devel- oped method of improving the efficiency of diagnosing data in RNS is that AS ~    ~ W A  ml1 , ml2 ,..., ml p of the number ARNS is determined not in the whole inter- ~ val  jM ,  j  1M  , which contains the incorrect number ARNS , but only in a small numerical interval ~  ~ H  A H   ARNS  ARNS M,  where ~ H  ARNS  0 || 0 || ... || 0 ||  n 1  is a number reduced to zero in RNS. The essence of reducing to zero in RNS is to replace the original number ~ ARNS  a1 || a 2 || ... || ai 1 || a~l || ai 1 || ... || a n || a n 1  with the number ~ H  ARNS  0 || 0 || ... || 0 ||  n 1  , by using a sequence of transformations, by which any intermediate number does not go beyond the working range 0  M  1 . zeroisation procedure can be implemented by various methods. The essence of all these methods is that some minimum ZC(i) numbers, so called zeroisatio constants (ZC), are sequen- tially subtracted from the initial number ~ ~ ARNS  a1 || a 2 || ... || ai 1 || a~1 || ai 1 || ... || a n || ... || a n  k  until the number ARNS is ~ H  converted into the number ARNS  0 || 0 || ... || 0 ||  n 1  and the value of the number ~ ARNS does not go beyond the range 0, M  . Geometrically, zeroisation procedure corresponds to the offset of the original number ~ ARNS  a1 || a 2 || ... || ai 1 || a~l || ai 1 || ... || a n || a n 1  to the left edge jM of its numeric range  jM ,  j  1M  . Thus, to eliminate the redundancy of AS ~    ~ W A  ml1 , ml2 ,..., ml p , by reducing the interval range of the number ARNS , the H  values ARNS  0 || 0 || ... || 0 ||  n 1  and A H  ~  ~ H   ARNS  ARNS  mod M have to be pre-defined. It can be conveniently demonstrated for particular RNS. As an example, for RNS defined by the bases m1  2, m2  3, m3  mn 1  5 M  2  3  6; M 0  2  3  5  30 (Table 2), in accordance with the distribution of errors in the intervals of the working range 0, M  [1], for each interval  jM ,  j  1M  two-entry tables are preliminarily compiled. Tables 3 of the corre- ~  spondence of W A    n 1 ; A  H  .  Table 2. Code Words in RNS A in RNS A to A in RNS A to PNS PNS 0 0 0 0 15 1 0 0 1 1 1 1 16 0 1 1 2 0 2 2 17 1 2 2 3 1 0 3 18 0 0 3 4 0 1 4 19 1 1 4 5 1 2 0 20 0 2 0 6 0 0 1 21 1 0 1 7 1 1 2 22 0 1 2 8 0 2 3 23 1 2 3 9 1 0 4 24 0 0 4 10 0 1 0 25 1 1 0 11 1 2 1 26 0 2 1 12 0 0 2 27 1 0 2 13 1 1 3 28 0 1 3 14 0 2 4 29 1 2 4 ~ As it was noted above AS W A    ml , ml ,..., ml 1 2 p  numbers are determined not on the ~ whole range  jM ,  j  1M  , which contains the incorrect number A , but only on the numerical range A H  . The method of on-line data diagnostic in RNS is pre- sented in Fig. 1. The considered method allows reducing the time of data diagnostic in RNS. The time to diagnose data is reduced, firstly, by eliminating non-positional operations such as converting numbers from RNS to PNS and comparing numbers, and, secondly, by using a single-entry tabular sampling of AS value. The proposed method of the rapid diagnostic of data errors improves the overall efficiency of using non-positional code structures in RNS. ~ Table 3. Table of values АS W A      n 1 ; A  H    n 1 A Z1 Z2 1 2 3 4 0 m3 m2 , m3 m1 ,m3 m2 , m3 Z3 1 m3 m2 , m3 m1 ,m3 m2 , m3 2 m3 m2 , m3 m1 , m 2 , m 3 m3 3 m3 m1 , m 2 , m 3 m2 , m3 m3 Z4 4 m2 , m3 m1 ,m3 m2 , m3 m3 5 m2 , m3 m1 ,m3 m2 , m3 m3 The drawback of the considered method of rapid data diagnostics in RNS is the con- siderable amount of equipment required for its implementation due to the large vol- ~ umes ( A   n 1  1 is a memory unit) of the memory (MMU) realizing func-   tion   n 1 ; A  H  . We propose the following improvements in order to reduce the amount of the necessary equipment to implement the method of rapid diagnostic. The essence of the improvements is to decrease in half the amount of the required equipment for the implementation of MMU content. This allows reducing the total amount of the required equipment for the implementation of the procedure for error diagnosing in NCS presented in RNS [20-22]. This is done by using the symmetry properties of the numerical data of the com- plete MMU table (Table 7) relative to the point with coordinate M 0  M  1 , that cor- 2 responds to the value m2, m3 and is analytically expressed (1) in the following way: ~      W A   1  n 1 ; A  H    2 m n 1   n 1 ; M  1  A  H   (1) 1. For a given RNS, a two-entry (two-coordinate) table of AS ~  W A    n 1 ; A  H   values contained in MMU is compiled. There H  1   n 1  mn 1  1 . Each pair of values  n 1 and A corresponds to a specific set of AS bases. 2. By means of a set of reduction to zero constants ZC(i) initial incorrect ~ ARNS  a1 || a 2 || ... || a i 1 || a~l || a i 1 || ... || a n || a n 1  number converted (reduced to zero) to A  H   0 || 0 || ... || 0 ||  n 1  number. We obtain value  n 1 that corresponds to ~ the first coordinate in the lookup table W A    n 1 ; A  H  .   3. A H  ~  ~ H   ARNS  ARNS  is determined. Therefore we obtain value A  of the H ~ second coordinate it the lookup table W A    n 1 ; A  H  .  4. According to obtained values of two coordinates A H  and  n 1 we refer to the two- ~  entry lookup table W A    n 1 ; A  H   from which the specific value of AS ~   W A  ml1 , ml2 ,..., ml p  of incorrect number ~ ARNS  a1 || a 2 || ... || a i 1 || a~l || a i 1 || ... || a n || a n 1  in RNS is determined. Fig. 1. Method of on-line data diagnostic in RNS The correctness of (1) can be easily shown by using the results of the lemma on the distribution of the terms of number sequence Ais  a1 , a 2 ,..., a i 1 , s, a i 1 ,..., a n , a n 1  in the numerical range 0, M 0  , where   s  0,1,..., mi 1 i  1, n  1 [1, 7, 8]. Basing on (1), the content of MMU for the pro- posed method of data diagnostic in RNS is presented in Table 4. Table 5 presents the characteristics Zi of quadrant numbers from the completed Table 3 of MMU data and Table 6 presents the attributes of quadrant numbers of the shortened Table 4 of MMU data. In Table 7 there are the values of numerical ranges for finding the MMU input numbers and the correspondent data attributes formed by the group of decoders. When implementing this method of data diagnostic in RNS [21, 22], in the diag- nostic scheme the module of determining characteristics is intended for to form and ~ use the characteristics Z 1  Z 4 of quadrant numbers A   n 1  1 of the completed 1 ~   2 p  data table MMU W A  ml , ml ,..., ml (Table 3). The characteristics are formed by means of a group of decoders (Table 4) and a combination of OR elements. Using ~ the values Z 1  Z 4 , according to input data  n 1 and A , the AS   ~ W A  ml1 , ml2 ,..., ml p  is determined by shortened table A~    2 1  of n 1   MMU data (Table 4). ~ Table 4. AS W A values of shortened MMU  n 1 A Z i Z1 1 2 0 m3 m2 , m3 Z3 1 m3 m2 , m3 2 m3 m2 , m3 3 m3 m1 , m 2 , m 3 Z4 4 m2 , m3 m1 ,m3 5 m2 , m3 m1 ,m3   ~   Table 5. Characteristics Z i i  1,4 of quadrant numbers A   n 1  1 of the completed ~   table AS data W A  ml , ml ,..., ml 1 2 p  II I Z1 Z 3  Z 2 Z 3  III IV Z 1 Z 4  Z 2 Z 4  The characteristics Z 1  Z 4 are applied as follows (Table 7): Z 1 and Z 2 are the char- ~ acteristics of finding a distorted ARNS number in the numerical ranges 1  mn 1  1 and 2 m n 1  1  m n 1  1 respectively; Z 3 and Z 4 - characteristics of finding a distorted 2 ~ number ARNS in the numerical ranges 0  M  1  1 and M  M  1 respectively. 2 2 ~ For the second (II) and the third (III) quadrants, shortened Table 6, AS W A values   are determined by formula W A  F1  n 1 ; A  H   . ~ ~   n 1  1  of the table of the data Table 6. Characteristics of quadrant numbers A      2  ~   W A  ml1 , ml2 ,..., ml p  ІІ Z1 Z 3  ІІІ Z 1 Z 4  Table 7. The value of numerical ranges and their correspondence to the data attributes Numerical Decoder Group Outputs Numerical range attribute range The group of the first decoder mn 1  1 outputs (the first group of MMU 1 Z1 inputs) 2 The group of the second de- coder outputs (the second group of 0  M 1 Z1 , Z 4 MMU inputs) The first group of the third de- mn 1  1 1 Z1 coder outputs 2 m n 1  1 The second group of the third  m n 1 decoder outputs 2 Z2 The first group of the fourth 0 M  1  1 Z3 decoder outputs 2 The second group of the fourth M  M 1 Z4 decoder outputs 2 For the first (I) and the fourth (IV) quadrants of the completed Table 3, according to ~  the values of the shortened Table 4, AS W A values are determined by formula (2):  W A  F2  mn1 ~   ; M  1  A   n 1 (2) The method of rapid data diagnostic in RNS is presented in Fig. 2. ~  1. A two-entry (two-coordinate) table of AS W A    n 1 ; A  H  values of the  MMU content is compiled where 1   mn  2  1 Each pair of values  and n 1  n 1 2 A H  corresponds to a specific set of AS bases. 2. By means of a set of reduction to zero constants ZC(i) initial incorrect ~ ARNS  a1 || a 2 || ... || a i 1 || a~l || a i 1 || ... || a n || a n 1  number is converted (re- H   duced to zero) into the following ARNS  0 || 0 || ... || 0 ||  n 1 number.  3. The analysis of the magnitude of obtained  n 1 value. If the condition 1   n 1  m n 1  1 / 2 is not met, i.e.  n 1  m n 1  1 then the subtraction 2 mn 1   n 1  mod mn 1 is performed. The value of mn 1   n 1  mod mn 1 is the ~  first coordinate of W A    n 1 ; A  H  table.  4. A H   ~ ~ H   ARNS  ARNS  is determined. Therefore we obtain value A H  of the ~  second coordinate it the lookup table W A    n 1 ; A  H  .  5. According to obtained values of two coordinates A H  and  n 1 we refer to the ~   two-entry lookup table W A    n 1 ; A  H  from which the specific value of AS ~   W A  ml1 , ml2 ,..., ml p  of incorrect number ~ ARNS  a1 || a 2 || ... || a i 1 || a~l || a i 1 || ... || a n || a n 1  in RNS is determined. Fig. 2. Method of on-line data diagnostic in RNS. 2 Examples of using the method of rapid data diagnostic in RNS In accordance with Fig. 2, let us present the examples 2-4 [21, 22] of using the me- thod of on-line data diagnostic in RNS determined by bases m1  2, m2  3, m3  mn1  5 ; M  2  3  6 ; M 0  2  3  5  30 (Table 2). Tables 8 and 9 present some zeroisation constants for the corresponding RNS basis. Table 8. The reduction to zero constants for the first base of RNS a1 ZC 0 0 || 0 || 0 1 1 || 1 || 1 ~  ~  To check the obtained diagnostic result W A  FRES  n 1 ; A , which is determined by the shortened Table 4 of W A  ~ MMU of the dimension ~   n 1  1  , the values A     2   ~  ~  W A  FTEST  n1 ; A are used, which are determined by the completed Table 3 of ~ MMU data of the dimension A   n 1  1 . Table 9. The reduction to zero constants for the second base of RNS a2 ZC 0 0 || 0 || 0 1 0 || 1 || 4 2 0 || 2 || 2 ~ of the number ~ Example 3. It is assumed to determine AS W A  A  1 || 1 || 2  . The value of the zeroisaton number is represented as ~ ~ A  H   A  KH  1 || 1 || 2   1 || 1 || 1  0 || 0 || 1 (Table 8). Thus, we have the value  n 1  1 (in binary code 001) and also determine that ~ ~ A  H   A  A H   1 || 1 || 2   0 || 0 || 1  1 || 1 || 1 . The value  n 1  1 (in binary code 001) is fed to the input of the decoder, from the output of which the value  n 1  1 is fed to the input of the corresponding element OR in the unitary code. The ~ H  value A  1 (in binary code 001) is fed to the input of the fourth decoder, from ~ the output of which the value A  H   1 is fed to the input of the corresponding OR element in the unitary code (Table 7). The value  n 1  1 (in the binary code 001) is fed to the decoder, from the output of which the value 1 in a unitary code, through a corresponding OR element, is fed to the first input of the first groups of MMU inputs. ~ At the same time, the value A  H   1 (in binary code 001) is fed to the input of the second decoder, from the output of which value 1 in the unitary code is fed to the first input of the second group of MMU inputs (Table 4). In accordance with the W A ~  data of MMU (Table 4), we obtain W A ~   m3  as the result of the procedure. There-  ~  ~  fore W A  FRES  n 1 ; A  FRES 1;1  m3 .  ~ ~   Check (Table 3): W A  FTEST  n 1 ; A  FTEST 1;1  m3 . ~ Example 4. Number A  0 || 0 || 4  is assumed to be diagnosed (AS W A  ~ of ~ A  0 || 0 || 4  number must be determined). First  n 1  4  0 is determined. Then ~ ~ we obtain A  H   A  A H   0 || 0 || 4   0 || 0 || 4   0 || 0 || 0 and therefore ~ A  0 . Value  n 1  4 is fed to the input of the decoder, from the output of which value  n 1  4 is fed to the input of the OR element in the unitary code (Table 7). ~ The value A  0 is fed to the input of the fourth decoder, from the output of which ~ value A  0 is fed to the input of the OR element in the unitary code. The value  n 1  4 (in the binary code 100) is fed to the inverter from the output of which the value m n 1   n 1  5  4  1 (in the binary code 001) is fed to the first decoder from the output of which the value 1 in a unitary code, through the corresponding OR element, is fed to a first input of the first group of MMU inputs (Table 4). Simultane- ~ ously, the value A  0 is fed to the inverter in binary cod, from the output of which ~ the value M  1  A  6  1  0  5 (in the binary code 101), through the OR element, is fed to the decoder input from the output of which the value 5 is fed to the fifth input of the second group of MMU inputs in a unitary code (Table 4). In accor- dance with the W A  ~ data of MMU (Table 4), the result of the diagnosing is deter- ~ mined by the value  n 1 that equals 1, and by the value A that equals 5. We obtain ~ W A  m2 , m3  as the result of the procedure. Therefore ~   ~  W A  FRES mn 1   n 1 ; M  1  A  FRES 1;5  m2 , m3  . ~  ~   Check (Table 3): W A  FTEST  n 1 ; A  FTEST 4;0  m2 m3 . 3 Conclusion According to the results of studying the methods of data diagnostic in RNS the im- proved method of rapid diagnostic is proposed for the practical implementation. Ap- plication of this method allows reducing the amount of the equipment required for implementing data diagnostic procedures in RNS without increasing the time of diag- nosis. This is achieved by reducing the amount of equipment for completed table ~ A   n 1  1 of MMU, by forming and using numerical characteristics Z 1  Z 4 ~ which show the belonging of the input numbers  n 1 and A of the table of MMU to ~ each of the four quadrants of the completed data table AS W A  ~ of the numbers A in RNS. This makes it possible to perform reliable diagnostic of the distorted number ~ A in RNS, i.e., precisely determine those bases of RNS where the residues of the correct number A have been distorted. The values of only a half (the second and the third quadrants) of the completed data table AS W A  ~ of MMU are used. The exam- ples of the practical usage of the method of diagnosis have been presented. The verifi- cation of the diagnosis of numbers in RNS, carried out by the developed method con- firms the validity of the stated goal and the practical feasibility of diagnosing data in RNS. Based on the proposed diagnostic method, an algorithm of its implementation has been developed and the patentable device has been produced. A device for moni- toring and diagnosing data presented in RNS has been patented in Ukraine. It should be noted that by increasing the length of the discharge grid of the calculator in RNS, the efficiency of the proposed method also increases. This can be used to solve vari- ous applied problems of computer science [25-30]. References 1. Akushsky, I.Ya., Yuditsky, D.I.: Machine arithmetic in residual classes. Moscow, Sov. Radio. 440 p. (1968) (in Russian) 2. Torgashov, V.A.: System of residual classes and the reliability of a computer. Moscow, Sov. Radio. 118 p. (1973) (in Russian) 3. Sasaki, A.: The Basis for Implementation of Ad idive Operations in the Residue Number System. IEEE Transactions on Computers. C-17, 1066–1073 (1968). doi:10.1109/TC.1968.226466 4. Givaki, K., Hojabr, R., Najafi, M.H., Khonsari, A., Gholamrezayi, M.H., Gorgin, S., Rah- mati, D.: Using Residue Number Systems to Accelerate Deterministic Bit-stream Multipli- cation. In: 2019 IEEE 30th International Conference on Application-specific Systems, Ar- chitectures and Processors (ASAP). IEEE (2019). doi: 10.1109/ASAP.2019.00-33 5. Hariri, A., Navi, K., Rastegar, R.: A Simplified Modulo (2n-1) Squaring Scheme for Resi- due Number System. In: EUROCON 2005 - The International Conference on “Computer as a Tool.” IEEE (2005). doi: 10.1109/EURCON.2005.1630004 6. Singh, T.: Residue number system for fault detection in communication networks. In: 2014 International Conference on Medical Imaging, m-Health and Emerging Communication Systems (MedCom). IEEE (2014). doi: 10.1109/MedCom.2014.7005995 7. Krasnobayev, V., Kuznetsov, A., Kononchenko, A., Kuznetsova, T.: Method of data con- trol in the residue classes. In Proceedings of the Second International Workshop on Com- puter Modeling and Intelligent Systems (CMIS-2019). Zaporizhzhia, Ukraine, April 15-19, pp. 241–252 (2019) 8. Banerjee, S., Chakraborty, S., Dey, N., Kumar Pal, A., Ray, R.: High Payload Watermark- ing using Residue Number System. International Journal of Image, Graphics and Signal Processing. 7, 1–8 (2015). doi: 10.5815/ijigsp.2015.03.01 9. Krasnobayev, V., Kuznetsov, A., Zub, M., Kuznetsova, K.: Methods for comparing num- bers in non-positional notation of residual classes. In Proceedings of the Second Interna- tional Workshop on Computer Modeling and Intelligent Systems (CMIS-2019). Zaporizhzhia, Ukraine, April 15-19, pp. 581–595 (2019) 10. Gbolagade, K.A., Cotofana, S.D.: Residue Number System operands to decimal conver- sion for 3-moduli sets. In: 2008 51st Midwest Symposium on Circuits and Systems. IEEE (2008). doi: 10.1109/MWSCAS.2008.4616918 11. Parhami, B.: On equivalences and fair comparisons among residue number systems with special moduli. In: 2010 Conference Record of the Forty Fourth Asilomar Conference on Signals, Systems and Computers. IEEE (2010). doi: 10.1109/ACSSC.2010.5757827 12. Krasnobayev, V., Kuznetsov, A., Koshman, S., Moroz, S.: Improved Method of Determin- ing the Alternative Set of Numbers in Residue Number System. In: Advances in Intelligent Systems and Computing. pp. 319–328. Springer International Publishing (2018). doi: 10.1007/978-3-319-97885-7_31 13. Phalakarn, K., Surarerks, A.: Alternative Redundant Residue Number System Construction with Redundant Residue Representations. In: 2018 3rd International Conference on Com- puter and Communication Systems (ICCCS). IEEE (2018). doi:10.1109/CCOMS.2018.8463305 14. Younes, D., Steffan, P.: Efficient image processing application using residue number sys- tem. Proceedings of the 20th International Conference Mixed Design of Integrated Circuits and Systems - MIXDES 2013, Gdynia, pp. 468-472 (2013) 15. Yatskiv, V., Tsavolyk, T., Yatskiv, N.: The correcting codes formation method based on the residue number system. In: 2017 14th International Conference The Experience of De- signing and Application of CAD Systems in Microelectronics (CADSM). IEEE (2017). doi: 10.1109/CADSM.2017.7916124 16. Popov, D.I., Gapochkin, A.V.: Development of Algorithm for Control and Correction of Errors of Digital Signals, Represented in System of Residual Classes. In: 2018 Interna- tional Russian Automation Conference (RusAutoCon). IEEE (2018). doi:10.1109/rusautocon.2018.8501826 17. Kocherov, Y.N., Samoylenko, D.V., Koldaev, A.I.: Development of an Antinoise Method of Data Sharing Based on the Application of a Two-Step-Up System of Residual Classes. In: 2018 International Multi-Conference on Industrial Engineering and Modern Technolo- gies (FarEastCon). IEEE (2018). doi:10.1109/fareastcon.2018.8602764 18. Kasianchuk, M., Yakymenko, I., Pazdriy, I., Melnyk, A., Ivasiev, S.: Rabin’s modified method of encryption using various forms of system of residual classes. In: 2017 14th In- ternational Conference The Experience of Designing and Application of CAD Systems in Microelectronics (CADSM). IEEE (2017) 19. Krasnobayev, V., Kuznetsov, A., Lokotkova, I., Dyachenko, A.: The Method of Single Er- rors Correction in the Residue Class. In: 2019 3rd International Conference on Advanced Information and Communications Technologies (AICT). IEEE (2019). doi:10.1109/AIACT.2019.8847845 20. Roshanzadeh, M., Saqaeeyan, S.: Error Detection & Correction in Wireless Sensor Net- works By Using Residue Number Systems. International Journal of Computer Network and Information Security. 4, 29–35 (2012). doi: 10.5815/ijcnis.2012.02.05 21. Krasnobaev, V., Kuznetsov, A., Babenko, V., Denysenko, M., Zub, M., Hryhorenko, V.: The Method of Raising Numbers, Represented in the System of Residual Classes to an Ar- bitrary Power of a Natural Number. In: 2019 IEEE 2nd Ukraine Conference on Electrical and Computer Engineering (UKRCON). IEEE (2019). doi:10.1109/UKRCON.2019.8879793 22. Kasianchuk, M., Yakymenko, I., Pazdriy, I., Zastavnyy, O.: Algorithms of findings of per- fect shape modules of remaining classes system. In: The Experience of Designing and Ap- plication of CAD Systems in Microelectronics. IEEE (2015) 23. Krasnobayev, V.A., Koshman, S.A.: A Method for Operational Diagnosis of Data Repre- sented in a Residue Number System. Cybernetics and Systems Analysis. 54, 336–344 (2018). doi:10.1007/s10559-018-0035-y 24. Patent for invention No. 112731, Ukraine, IPC G 06 F 11/08 (2006.01). Signs of monitor- ing and diagnostics Presented in system standards. (2016) 25. Krasnobayev, V., Koshman, S., Yanko, A., Martynenko, A.: Method of Error Control of the Information Presented in the Modular Number System. In: 2018 International Scien- tific-Practical Conference Problems of Infocommunications. Science and Technology (PIC S&T). IEEE (2018). doi:10.1109/infocommst.2018.8632049 26. Chornei, R.K., Daduna V.M., H., Knopov, P.S.: Controlled Markov Fields with Finite State Space on Graphs. Stochastic Models. 21, 847–874 (2005). doi:10.1080/15326340500294520 27. Runovski, K., Schmeisser, H.: On the convergence of fourier means and interpolation means. Journal of Computational Analysis and Applications. 6(3), 211-227 (2004) 28. Tkach, B.P., Urmancheva, L.B.: Numerical-analytic method for finding solutions of sys- tems with distributed parameters and integral condition. Nonlinear Oscillations. 12, 113– 122 (2009). doi:10.1007/s11072-009-0064-6 29. Bondarenko, S., Liliya, B., Oksana, K., & Inna, G.: Modelling instruments in risk man- agement. International Journal of Civil Engineering and Technology. 10(1), 1561-1568 (2019) 30. Ponochovniy, Y., Bulba, E., Yanko, A., Hozbenko, E.: Influence of diagnostics errors on safety: Indicators and requirements. In: 2018 IEEE 9th International Conference on De- pendable Systems, Services and Technologies (DESSERT). IEEE (2018). doi:10.1109/dessert.2018.8409098