## 4 Modified Method Based on MRC
}\left.\left|P_{i}^{-1}\right|_{p_{i}}\right.\) and \(B_{i}=\left.P_{i}\cdot\left|P_{i}^{-1}\right|_{p_{i}}\right.\):  
\[P_{1}=8\cdot 9=72,\quad\left|P_{1}^{-1}\right|_{p_{1}}=\left|72^{-1} \right|_{7}=4,\quad B_{1}=288,\] \[P_{2}=7\cdot 9=63,\quad\left|P_{2}^{-1}\right|_{p_{2}}=\left|63^{-1} \right|_{8}=7,\quad B_{2}=441,\] \[P_{3}=7\cdot 8=56,\quad\left|P_{3}^{-1}\right|_{p_{3}}=\left|56^{-1} \right|_{9}=5,\quad B_{3}=280.\]  
Let us calculate \(\hat{w}_{j}=\prod_{i=1}^{j-1}p_{i}\):  
\[\hat{w}_{1}=1,\hat{w}_{2}=7,\hat{w}_{3}=7\cdot 8=56.\]  
Let us calculate the representation of \(B_{i}\) in MRC:  
\[B_{1}\xrightarrow{\text{MRC}}\hat{B}_{1}=\left[\hat{b}_{1,1}, \hat{b}_{1,2},\hat{b}_{1,3}\right]=[1,1,5]\text{, checking }1+1\cdot 7+5\cdot 56=288,\] \[B_{2}\xrightarrow{\text{MRC}}\hat{B}_{2}=\left[\hat{b}_{2,1}, \hat{b}_{2,2},\hat{b}_{2,3}\right]=[0,7,7]\text{, checking }0+7\cdot 7+7\cdot 56=441,\] \[B_{3}\xrightarrow{\text{MRC}}\hat{B}_{3}=\left[\hat{b}_{3,1}, \hat{b}_{3,2},\hat{b}_{3,3}\right]=[0,0,5]\text{, checking }0+0\cdot 7+5\cdot 56=280.\]  
Given \(X=10=\) (3,2,1), we can compute \(U_{i}=\sum_{j=1}^{i}x_{j}\cdot\hat{b}_{j,i}\):  
\[U_{1}=x_{1}\cdot\hat{b}_{1,1}=3\cdot 1=3,\] \[U_{2}=x_{1}\cdot\hat{b}_{1,2}+x_{2}\cdot\hat{b}_{2,2}=3\cdot 1+2 \cdot 7=17,\] \[U_{3}=x_{1}\cdot\hat{b}_{1,3}+x_{2}\cdot\hat{b}_{2,3}+x_{3}\cdot \hat{b}_{3,3}=3\cdot 5+2\cdot 7+1\cdot 5=34.\]  
Let us calculate \(\hat{x}_{i}=\left.\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.\):  
\[P_{2}=7\cdot 9=63,\quad\left|P_{2}^{-1}\right|_{p_{2}}=\left|63^{-1} \right|_{8}=7,\quad B_{2}=441,\]0 \[P_{2}=7\cdot 9=63,\quad\left|P_{2}^{-1}\right|_{p_{2}}=\left|63^{-1} \right|_{8}=7,\quad B_{2}=441,\]1 \[P_{2}=7\cdot 9=63,\quad\left|P_{2}^{-1}\right|_{p_{2}}=\left|63^{-1} \right|_{8}=7,\quad B_{2}=441,\]2  
From this we obtain:  
\[P_{2}=7\cdot 9=63,\quad\left|P_{2}^{-1}\right|_{p_{2}}=\left|63^{-1} \right|_{8}=7,\quad B_{2}=441,\]3  
Consider the block diagram for converting numbers from RNS and base expansion based on the Algorithm 3 shown in \[P_{2}=7\cdot 9=63,\quad\left|P_{2}^{-1}\right|_{p_{2}}=\left|63^{-1} \right|_{8}=7,\quad B_{2}=441,\]4  
The number \((x_{1},x_{2},\ldots,x_{n})\) represented in RNS is fed to the \(n\) inputs of the residues, where \(n\) is the number of moduli of the residue number system. The residues from the corresponding residue inputs are written to \(n\) residue storage units. From the outputs of the residue storage units, the residues moduli \(\{p_{1},p_{2},\ldots,p_{n}\}\) are fed to multipliers which form a triangular matrix and calculated values of the products of the residue with the base coefficients in the MRC \(x_{j}\cdot\hat{b}_{j,i}\), where \(B_{i}=P_{i}\cdot\left|P_{i}^{-1}\right|_{p_{i}}=\sum_{j=1}^{n}\hat{b}_{i,j} \cdot\hat{w}_{j}\), are orthogonal bases of RNS, \(\hat{w}_{j}=\prod_{i=1}^{j-1}p_{i},j=\overline{1,n}\) are bases of MRC, with \(\hat{w}_{0}=1\). The output of the first residue storage unit modulo \(p_{1}\) is connected to the inputs of \(n\) multipliers by \(\hat{b}_{1,1}\), \(\ldots\), \(\hat{b}_{1,n}\), which compute the values \(x_{1}\cdot\hat{b}_{1,i}\), \(i=\overline{1,n}\). The output of the second residue storage unit modulo \(p_{2}\) is connected to the inputs of the \((n-1)\)-th multiplier by \(\hat{b}_{2,2}\), \(\ldots\), \(\hat{b}_{2,n}\), which compute the values \(x_{2}\cdot\hat{b}_{2,i}\), \(i=\overline{2,n}\), and so on, the output of the \(n\)-th residue storage unit modulo \(p_{n}\) are connected to the input of the multiplier by \(\hat{b}_{n,n}\), which calculates the value \(x_{n}\cdot\hat{b}_{n,n}\).