Error Detection

To detect communication errors, parity bits are used. A parity bit is a bit added to the end of a byte to help determine whether it was transmitted without error. For instance, when a communications protocol uses even parity, then every byte is guaranteed to have an even number of ones. Seven bits are used for the actual information (e.g., ASCII characters), and the sender sets the eighth bit to either one or zero, ensuring that there are an even number of ones. If a recipient gets a byte with an odd number of ones, then he or she knows that there was a transmission error.

For example, the ASCII code for the letter A is 0100001. If you were sending this with even parity, you would tack a zero on to the front, making the byte equal to 00100001, which has an even number (two) of ones. If a transmission error caused the byte to equal 00100101 upon arrival, the recipient would know there was an error, because the protocol guarantees an even number of bits.

As another example, if you wanted to send the letter C (0100011), you would add a one to make the byte to be transmitted equal to 10100011, which has an even number (four) bits. If your recipient received 10100011, he or she could be reasonably confident that a C was transmitted.

Of course, if there are two errors in the same byte, it can throw off the scheme. If you meant to send a C (10100011), but 00100001 was received (the first and seventh bits were both corrupted), your recipient would mistakenly assume that you sent an A. However, the likelihood of that happening is small.

Parity bits are used in communications devices such as modems. Parity bits are also included in most modern computer memory. Since memory is stored in bytes, most modern memory stores information in 9-bit patterns, consisting of 8 bits for the byte to be stored plus one parity bit.

Next (Error Correction)