## 5 Hardware Implementation of Modified Modular Projection Method with MLD
It is implemented by extracting the most significant bits with numbers not less than \(N\) (14) from the extended weighted characteristic (the output of the block \(F^{\prime}(X^{\prime}_{i})\)). Block \(F\left(X^{\prime}_{i}\right)\). This block calculates weighted characteristics for each modular projection \(X^{\prime}_{i}\). It is implemented by extracting the least significant bits with numbers less than \(N\) (13) from the extended weighted characteristic (the output of the block \(F^{\prime}(X^{\prime}_{i})\)). Figure 2: Scheme of parallelizing modular projection methods with MLD: (**a**) original, (**b**) modified. Block \({X^{\prime}}_{i_{n_{j}}}^{(1)}\). This block calculates the missing remainders (the first term) for each modular projection \(X^{\prime}_{i}\). It is implemented by \(k\) parallel multiplications of the remainders (the outputs of the block \(X^{\prime}_{i}\)) by constants modulo \(M\) and a \(k\)-operand modulo adder [31]; see Equation (17). Block \({X^{\prime}}_{i_{n_{j}}}^{(2)}\). This block calculates the missing remainders (the second term) for each modular projection \(X^{\prime}_{i}\). It is implemented by multiplying the rank (the output of the block \(r_{X^{\prime}_{i}}\)) by a constant modulo \(M\)[31]; see Equation (18). Block \(\left|X^{\prime}_{i}\right|_{n_{j}}\). This block calculates the missing remainders for each modular projection \(X^{\prime}_{i}\). It is implemented by modulo adding the first term (the output of the block \({X^{\prime}}_{i_{n_{j}}}^{(1)}\)) to the second term (the output of the block \({X^{\prime}}_{i_{n_{j}}}^{(2)}\)) [31]; see Equation (19). Block \(X^{\prime}_{i}\) (6). This block calculates the modular projections \(X^{\prime}_{i}\) in the WNS. It is implemented by multiplying the weighted characteristic of the modular projection (the output of the block \(F\left(X^{\prime}_{i}\right)\)) by the dynamic range \(M_{K}\). Subsequently, the least significant bits with numbers less than \(N\) are discarded; see Equation (6). Block \(h\left(X\prime,\ X^{\prime}_{i}\right)\). This block calculates Hamming distances between the distorted number \(X\prime\) and each modular projection \(X^{\prime}_{i}\). It is implemented by \((n-k)\) parallel comparisons of the corresponding remainders of the distorted number \(X\prime\) (the outputs of the block \(X\prime\)) and the modular projection \(X^{\prime}_{i}\) (the outputs of the block \(\left|X^{\prime}_{i}\right|_{n_{j}}\)). Subsequently, the mismatches are counted by an \(n\)-operand adder. Block \(XX\) (9). This block chooses a correct modular projection. It is implemented by the conjunction of two comparisons: the modular projection \(X^{\prime}_{i}\) in the WNS (the output of the block CRT: \(X^{\prime}_{i}\)) is smaller than the dynamic range \(M_{K}\), and the Hamming distance (the output of the block \(h\left(X\prime,\ X^{\prime}_{i}\right)\)) is not greater than the maximum multiplicity \(t\) of errors corrected by the \((n,\ k)\)-RRNS. The results for each thread (conjunctions for different modular projections) are glued together into a \(C^{t}_{n/2}\)-bit number, and the number of the first nonzero bit corresponds to the correct modular projection. Block \(XX\). This block outputs the correct number \(X\) in the WNS. It is implemented by a \(C^{t}_{n/2}\)-input multiplexer with one control input. The common inputs are the modular projections \(X^{\prime}_{i}\) in the WNS (the outputs of the block CRT: \(X^{\prime}_{i}\)). The control input is the number of the correct modular projection (the output of the block \(X\) (9)). In the course of comparative analysis, we obtained data on the time and hardware costs for correcting single and double errors in modular codes. We used the \((2,4)\)-RRNS (single error) and \((2,6)\)-RRNS (double error) for numbers of different bit widths (4 bits, 8 bits, 16 bits, 24 bits, 32 bits, 48 bits, and 64 bits).