Parity bit

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.

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.

In mathematics parity can refer to the evenness or oddness of an integer, which, when written in its binary form, can be determined just by examining only its least significant bit.

In information technology parity refers to the evenness or oddness, given any set of binary digits, of the number of those bits with value one.

In electronics, transcoding data with parity can be very efficient, as XOR gates output what is equivalent to a check bit that creates an even parity, and XOR logic design easily scales to any number of inputs.

However, parity has the advantage that it uses only a single bit and requires only a number of XOR gates to generate.

Bob observes even parity, as expected, thereby failing to catch the two bit errors.

Because of its simplicity, parity is used in many hardware applications in which an operation can be repeated in case of difficulty, or simply detecting the error is helpful.

Because the Instruction cache data is just a copy of the main memory, it can be disregarded and refetched if it is found to be corrupted.

Recovery from the error is usually done by retransmitting the data, the details of which are usually handled by software (such as the operating system I/O routines).

So the same XOR concept above applies similarly to larger RAID arrays with parity, using any number of disks.

Parity in this form, applied across multiple parallel signals, is known as a transverse redundancy check.

This can be combined with parity computed over multiple bits sent on a single signal, a longitudinal redundancy check.

On the systems sold by British company ICL (formerly ICT) the 1-inch-wide (25 mm) paper tape had 8 hole positions running across it, with the 8th being for parity.

Diagrammatic oscilloscope trace of voltage levels for a RS232 transmission of a 7 bit ASCII "K" character (4Bh = 1001011b) framed as 1 start bit, 7 data bits (least significant bit first), even parity, and 1 stop bit: 7E1.