## 4 Modified Method Based on MRC  
The patent [17] presents a new Algorithm 3 for translation of RNS to the positional number system and base extension based on the mixed-radix conversion, which we will hereafter call \"the modified mixed-radix conversion method\". This algorithm works with moduli of the generalized form. ```
0:\((x_{1},\ldots,x_{n})\), \(p_{n+1}\)
0:\(X\), \(|X|_{p_{n+1}}\)
1:\(P_{i}=\frac{p}{p_{i}};\left|P_{i}^{-1}\right|_{p_{i}};B_{i}=P_{i}\cdot\left|P _{i}^{-1}\right|_{p_{i}}\)
2:\(\hat{w}_{1}=1\); \(\hat{w}_{j}=\prod_{i=1}^{j-1}p_{i}\), \(j=\overline{2,n}\)
3:\(B_{i}\xrightarrow{\text{MRC}}\left.\left[\hat{b}_{ij}\right],i,j=\overline{1,n}\), \(B_{i}=\sum_{j=1}^{n}\hat{b}_{i,j}\cdot\hat{w}_{j}\right.\)
4:\(U_{i}=\sum_{j=1}^{j}x_{j}\cdot\hat{b}_{j,i}\), \(i=\overline{1,n}\)
5:\(\sigma_{0}=0\), \(\hat{x}_{i}=\left|\sigma_{i-1}+U_{i}\right|_{p_{i}}\), \(\sigma_{i}=\left\lfloor\frac{\sigma_{i-1}+U_{i}}{p_{i}}\right\rfloor\)
6:\(X=\sum_{i=1}^{n}\hat{x}_{i}\cdot\hat{w}_{i}\),
7:\(\left|X\right|_{p_{n+1}}=\left|\sum_{i=1}^{n}\hat{x}_{i}\cdot\hat{w}_{i}\right| _{p_{n+1}}\)
8:return\(X\), \(\left|X\right|_{p_{n+1}}\)
```  
**Algorithm 3** Reconstructing numbers and expanding bases  
In some cases it is necessary to add one or more additional moduli to detect range overflows or to detect and correct errors. If the modulo \(p_{n+1}\) is added, then the new range allows the display of any number \(X<P\cdot p_{n+1}\). Consider the Algorithm 3 in detail. Set of a residue number system with moduli \(\{p_{1},p_{2},\ldots,p_{n}\}\) for which the orthogonal bases of RNS \(B_{i}=P_{i}\cdot\left|P_{i}^{-1}\right|_{p_{i}}\), \(i=\overline{1,n}\). Compute the bases of the MRC \(\hat{w}_{j}=\prod_{i=1}^{j-1}p_{i}\), \(j=\overline{2,n}\), with \(w_{1}=1\). The orthogonal RNS bases are represented in MRC as a vector of values \(\hat{b}_{i,j}\), for which \(B_{i}=\sum_{j=1}^{n}\hat{b}_{i,j}\cdot\hat{w}_{j}\). The values of \(\hat{b}_{i,j}\) form a triangular matrix. Given \(X=(x_{1},x_{2},\ldots,x_{n})\), we need to recover the number \(X\) in the positional number system and find the remainder of the division of \(X\) by an additional modulo \(p_{n+1}\), which we denote by \(\left|X\right|_{p_{n+1}}\). To do this, \((x_{1},x_{2},\ldots,x_{n})\) is multiplied by the triangular matrix \(\hat{b}_{i,j}\), so \(U_{i}=\sum_{j=1}^{i}x_{j}\cdot\hat{b}_{j,i}\), \(i=\overline{1,n}\). Then \(\hat{x}_{i}=\left|\sigma_{i-1}+\left.U_{i}\right|_{p_{i}}\right.\) and \(\sigma_{i}=\left.\left\lfloor\frac{\sigma_{i-1}+U_{i}}{p_{i}}\right\rfloor\right.\) are calculated, assuming that \(\sigma_{0}=0\). We can substitute that \(\hat{x}_{i}\) and \(\sigma_{i}\) are related as the remainder of the division of the sum \((\sigma_{i-1}+U_{i})\) by the modulo \(p_{i}\) and the rank of the sum, i.e., the carry by how many times the sum value exceeds the modulo. Then find the value of the expression \(X=\sum_{i=1}^{n}\hat{x}_{i}\cdot\hat{w}_{i}\) to convert a number from RNS to a positional number system, and to expand the bases, find \(\left|X\right|_{p_{i+1}}=\left|\left|\sum_{i=1}^{n}\hat{x}_{i}\cdot\hat{w}_{i }\right|_{p_{i+1}}\right.\). Let us consider an example to illustrate how the algorithm works. Given a residue number system with three moduli {7,8,9}. Then let \(P=\prod_{i=1}^{3}p_{i}=504\). Let us calculate \(P_{i}=\frac{P}{p_{i}!