How does a parity code detect an error in a block of bits?
Consider a simple telephone conversation: A person (message source) speaks into a telephone receiver (encoder), which converts the sound of the spoken word into an electrical signal. This electrical signal is then transmitted over telephone lines (channel) subject to interference (noise). When the signal reaches the telephone receiver (decoder) at the other end of the line it is converted back into vocal sounds. Finally, the recipient (message receiver) hears the original message.
A parity code detects errors by adding a single redundant bit to a block of data to ensure the total number of ones in that block consistently results in either an even or an odd sum. This process is known as a parity check.12
When a block of bits is transmitted, the receiver calculates the parity of the received data. If a single bit is flippedâchanging a 0 to a 1 or a 1 to a 0âthe total count of ones will change from even to odd (or vice versa), thereby altering the expected parity. Because the received parity no longer matches the established rule, the system identifies that an error has occurred.1
While this method effectively signals that data integrity has been compromised, it does not identify the specific location of the error or correct it automatically. Consequently, systems using parity codes often rely on an automatic request to retransmit the corrupted message.1