Cambridge O Level Computer Science · Syllabus 2210 · Data Transmission
Checksum
What is Checksum?
A checksum is a value calculated from a block of data using an agreed calculation; it is sent with the data, recalculated by the receiver, and a difference between the two values shows that an error occurred during transmission.
This definition is part of the Data Transmission chapter in Cambridge O Level Computer Science.
Checksum in context
A checksum is a value calculated from a block of data by applying an agreed calculation to it. The sender performs that calculation, sends the resulting checksum value together with the data, and the receiver repeats the same calculation on the data it received. The two values are then compared. If they are different, the data has changed during transmission and an error has been detected. If they are the same, no error has been detected — which is not the same thing as the data being guaranteed correct.
Automatic repeat query (ARQ) is a method of establishing that data has been received without error. It uses an error-detection method — such as a checksum or a parity check — on the received data, and then acts on the result. If the data passes the check, the receiver returns a positive acknowledgement. If it fails, the receiver returns a negative acknowledgement, and the sender retransmits. If no acknowledgement arrives at all before the sender's timeout expires, the sender assumes the data did not get through and retransmits anyway. The process repeats until the data is acknowledged or the system stops after the number of attempts it permits.
Questions students ask about Checksum
What is the difference between a parity check and a checksum?
A parity check adds one extra parity bit to a group of bits so the total number of 1 bits is even or odd, as agreed in advance; the receiver recounts the 1 bits, and a mismatch shows an error. A checksum is a value calculated from a whole block of data using an agreed calculation; the sender transmits it with the data, the receiver repeats the calculation, and a difference between the two values shows the data changed during transmission. Neither method proves the data is completely correct if the values still match.
How does automatic repeat query (ARQ) get corrupted data resent?
ARQ uses an error-detection method, such as a parity check or checksum, on the data the receiver gets. If the data passes the check, the receiver sends back a positive acknowledgement. If it fails, the receiver sends a negative acknowledgement and the sender retransmits the data. If no acknowledgement arrives at all before the sender's timeout expires, the sender assumes the data did not arrive and retransmits anyway. This repeats until the data is acknowledged or the permitted number of attempts is used up.

