## Checksum |

This article needs additional citations for . (August 2012) ( |

A **checksum** is a small-sized

The actual **checksum function** or ** checksum algorithm**. Depending on its design goals, a good checksum algorithm will usually output a significantly different value, even for small changes made to the input. This is especially true of

Checksum functions are related to

- algorithms
- see also
- references
- external links

The simplest checksum algorithm is the so-called *n* of bits, and then computes the *n* zeros, the receiver knows a transmission error occurred.

With this checksum, any transmission error which flips a single bit of the message, or an odd number of bits, will be detected as an incorrect checksum. However, an error which affects two bits will not be detected if those bits lie at the same position in two distinct words. Also swapping of two or more words will not be detected. If the affected bits are independently chosen at random, the probability of a two-bit error being undetected is 1/*n*.

A variant of the previous algorithm is to add all the "words" as unsigned binary numbers, discarding any overflow bits, and append the ^{[1]}

The simple checksums described above fail to detect some common errors which affect many bits at once, such as changing the order of data words, or inserting or deleting words with all bits set to zero. The checksum algorithms most used in practice, such as

A message that is *m* bits long can be viewed as a corner of the *m*-dimensional hypercube. The effect of a checksum algorithm that yields an n-bit checksum is to map each *m*-bit message to a corner of a larger hypercube, with dimension . The 2^{m+n} corners of this hypercube represent all possible received messages. The valid received messages (those that have the correct checksum) comprise a smaller set, with only 2^{m} corners.

A single-bit transmission error then corresponds to a displacement from a valid corner (the correct message and checksum) to one of the *m* adjacent corners. An error which affects *k* bits moves the message to a corner which is *k* steps removed from its correct corner. The goal of a good checksum algorithm is to spread the valid corners as far from each other as possible, so as to increase the likelihood "typical" transmission errors will end up in an invalid corner.

Other Languages

Afrikaans: Kontrolesom

العربية: تدقيق المجموع

azərbaycanca: Nəzarət cəmi

Bân-lâm-gú: Lia̍h-chóng-bé

български: Контролна сума

català: Checksum

čeština: Kontrolní součet

dansk: Kontrolsum

Deutsch: Prüfsumme

eesti: Kontrollsumma

español: Suma de verificación

فارسی: سرجمع

français: Somme de contrôle

한국어: 체크섬

íslenska: Prófsumma

italiano: Checksum

עברית: סיכום ביקורת

latviešu: Kontrolsumma

magyar: Ellenőrző összeg

Nederlands: Controlecijfer

日本語: チェックサム

norsk: Sjekksum

polski: Suma kontrolna

português: Soma de verificação

русский: Контрольная сумма

Simple English: Checksum

slovenčina: Kontrolný súčet

suomi: Tarkistussumma

svenska: Kontrollsumma

ไทย: ผลรวมตรวจสอบ

українська: Контрольна сума

Tiếng Việt: Giá trị tổng kiểm

中文: 校验和