Topic summary

Parity bit

Parity bit

A parity bit, or check bit, is a bit added to a string of binary code. Parity bits are a simple form of error detecting code. Parity bits are generally applied to the smallest units of a communication protocol, typically 8-bit octets (bytes), although they can also be applied separately to an entire message string of bits.

The parity bit ensures that the total number of 1-bits in the string is even or odd. Accordingly, there are two variants of parity bits: even parity bit and odd parity bit. In the case of even parity, the parity bit is selected so the total number of set bits (including the parity bit) is even; if the number of bits set in the data is odd, the parity bit is set to 1 to make the total even. In the case of odd parity, the coding is reversed: the parity bit is chosen so the total number of set bits (including the parity bit) is odd. Parity is a special case of a cyclic redundancy check (CRC), where the 1-bit CRC is generated by the polynomialx+1.