next up previous

Parity checks

Let us assume that the probability of transmission error is small. That is certainly true with our technology today. By small we mean that the probability of a single bit being wrong in a message is some small fraction of a percent (as small as possible). In particular, we ignore catastrophic errors such as scratches or breaks in media, which produce large bursts of errors.

Parity is about evenness or oddness, in the numerical sense. To find out the parity of a message, we add up the bits in the message; if the number of 1's is even, then we say that the message has even parity (or parity zero). If the number of 1's is odd, then we say that the message has odd parity, (or parity 1). Another way of saying this is that the parity of a message is

 Parity = Sum_of_bits mod 2

The idea of a parity check is to make an extremely primitive message digest. We use one bit in a bit-string to signal the parity of that string. The sender calculates the parity and appends a parity bit to the data (e.g. 1 bit in every byte). The receiver then checks that the parity is consistent with the received message. If it is not consistent, then an error must have occurred. There are two problems with this:

Errors must be corrected by retransmission.


next up previous
Next: Encoded redundancy Up: Error correction Previous: Hashes
Mark Burgess
2000-10-16