Skip to Main Content
The idea of adding a magnitude index to the residue representation of numbers is reconsidered. The range of a given residue number system is supposed to be divided into intervals of equal width, and the magnitude index of a number X is defined as an integer locating X into one of such intervals. It is shown that the redundancy implied by the use of the magnitude index allows error detection or correction, and the redundancy requirements to detect or correct single residue digit errors are the same as in redundant residue number systems and in product codes in residue number systems. In addition, these codes allow detection of any error affecting the residue representation, provided that the magnitude of the error exceeds a given threshold, and, whenever an error is detected, it is possible to replace the wrong number with an approximation of the correct number.