Skip to content
Search

Checksum

lastmod 2018-12-26created 2015-08-123 edits

A checksum is a form of redundancy check, a simple way of protecting the integrity of data transmitted through space (telecommunications) or time (storage devices) by means of error correction.

In communications, a cyclic redundancy check (CRC) is sometimes also called a checksum. Strictly speaking, a checksum adds up the listed data to get a checksum number, then reduces it to a fixed number of bits by taking the modulo of that fixed bit count. The simple-addition method differs from the way a cyclic redundancy check is computed, but since the result of a cyclic redundancy check is often called a checksum, the term does not mean simple addition only.

It works by adding up the basic components of a message (usually bits) and storing the resulting value. Later, anyone can perform the same operation on the data, compare the result for an integrity check, and (by checking whether the checksum matches) conclude that the message has not been corrupted.

When designing microprocessor-based systems, programs are mostly written in C. C code is finally combined by the compiler and linker into a bundle of machine code. This is the executable (hex file, hexa), which is written to memory so the CPU can run it. A checksum is applied to this executable to check for errors line by line. It was used by Intel and formerly Motorola (now Freescale, a semiconductor chip manufacturer). Here, bytes are simply added according to a fixed format, and the final value is made by taking the modulo of 1 byte. This value is appended to the end of the line for error checking, producing the file.

See also

Favorite site

author Zer0 sitemap