In computers, parity (from the Latin paritas, meaning equal or equivalent) is a technique that checks whether data has been lost or written over when it is moved from one place in storage to another or when it is transmitted between computers.
How parity works
Because data transmission is not an entirely error-free process, data is not always received in the same way as it was transmitted. A parity bit adds checksums into data that enable the target device to determine whether the data was received correctly.
An additional binary digit, the parity bit, is added to a group of bits that are moved together. This bit, sometimes referred to as a check bit, is used only to identify whether the moved bits arrived successfully.
|7 bits of data||(count of 1-bits)||8 bits including parity|
A parity bit, or check bit, is a bit added to a string of binary code to ensure that the total number of 1-bits in the string is even or odd. Parity bits are used as the simplest form of error detecting code.
There are two variants of parity bits: even parity bitand odd parity bit.
In the case of even parity, for a given set of bits, the occurrences of bits whose value is 1 is counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1s in the whole set (including the parity bit) an even number. If the count of 1s in a given set of bits is already even, the parity bit’s value is 0. To read more :