How does a parity code detect an error in a block of bits?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

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