[Jump to code hierarchy]

Arithmetic residue code

Alternative Names: Separate residue code.

Description

Checksum code that appends to an integer its residue modulo a check base \(m\) [1,2]. Residues of operands predict the residue of their sum or product, so a result whose residue disagrees reveals an error [1].

For the low-cost check bases \(m=2^a-1\), the residue of a binary integer is the end-around-carry sum of its \(a\)-bit bytes [1,3].

Protection

An error in the integer goes undetected exactly when it changes the integer by a multiple of \(m\). Biresidue codes, which use two residue checkers, locate and correct any single error position [4]. Residue checks are the only checks that let an adder be verified by a circuit independent of it [2].

Realizations

Computer arithmetic: the arithmetic elements of the Burroughs Scientific Processor used modulo-3 residue arithmetic to check hardware failures [5].

Notes

See Refs. [6,7] for reviews of arithmetic codes.

Primary Hierarchy

Parents
Arithmetic residue codewords are strings of radix-\(q\) digits, labeled by elements of \(\mathbb{Z}_q\), whose last digits store a residue modulo the check base.
The checksum of an arithmetic residue code is the residue of an integer modulo a check base.
Arithmetic residue code
Children
The Internet checksum is the one’s complement of the residue of the message modulo \(2^{16}-1\), which is the end-around-carry sum of its 16-bit words [8; pp. 1 and 18].
The casting-out-nines code is the arithmetic residue code with check base nine for decimal integers, whose residue is the digit sum modulo nine [9; pp. 181-183].

References

  1. [1]

    R. S. Lim, “Concurrent error-detecting codes for arithmetic processors”, NASA Technical Paper 1528 (1979) URL

  2. [2]

    W. W. Peterson, “On Checking an Adder”, IBM Journal of Research and Development 2, 166 (1958) DOI

  3. [3]

    A. Avizienis, “Arithmetic Error Codes: Cost and Effectiveness Studies for Application in Digital System Design”, IEEE Transactions on Computers C–20, 1322 (1971) DOI

  4. [4]

    T. R. N. Rao, “Biresidue Error-Correcting Codes for Computer Arithmetic”, IEEE Transactions on Computers C–19, 398 (1970) DOI

  5. [5]

    D. D. Gajski and L. P. Rubinfield, “Design of arithmetic elements for Burroughs Scientific Processor”, 1978 IEEE 4th Symposium onomputer Arithmetic (ARITH) 245 (1978) DOI

  6. [6]

    T. R. N. Rao, Error Coding for Arithmetic Processors (Academic Press, 1974)

  7. [7]

    J. L. Massey and O. N. García, “Error-Correcting Codes in Computer Arithmetic”, Advances in Information Systems Science 273 (1972) DOI

  8. [8]

    R. T. Braden, D. A. Borman, and C. Partridge, Computing the Internet Checksum (RFC Editor, 1988) DOI

  9. [9]

    B. Datta and A. N. Singh, History of Hindu Mathematics: A Source Book, Part 1 (Asia Publishing House, 1962) URL

Page edit log

Your contribution is welcome!

on github.com (edit & pull request)

— see instructions

Zoo Code ID: arithmetic_residue

Cite as:
“Arithmetic residue code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/arithmetic_residue, arXiv:2606.11484
BibTeX:
@incollection{eczoo_arithmetic_residue,
title={Arithmetic residue code},
booktitle={The Error Correction Zoo},
year={2026},
editor={Albert, Victor V. and Faist, Philippe},
eprint={2606.11484},
doi={10.48550/arXiv.2606.11484},
url={https://errorcorrectionzoo.org/c/arithmetic_residue}
}
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:
https://errorcorrectionzoo.org/c/arithmetic_residue

Cite as:

“Arithmetic residue code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/arithmetic_residue, arXiv:2606.11484

Github: https://github.com/errorcorrectionzoo/eczoo_data/edit/main/codes/classical/rings/over_zq/arithmetic/arithmetic_residue.yml.