Skip to content
๐Ÿงฎ Parity Bits in Digital Systems

๐Ÿงฎ Parity Bits in Digital Systems

๐Ÿง  Motivation

โ„น๏ธ

Why we invented this Parity bits offer a lightweight method for error detection in digital communication and storage.

By encoding the evenness or oddness of 1s in a binary word, parity bits help verify data integrity without heavy computational overhead.


๐Ÿ”ฃ What Is a Parity Bit?

A parity bit is an extra bit appended to a binary word to encode whether the total number of 1s is even or odd.

  • โœ… Even Parity: Parity bit is set so that the total number of 1s (including the parity bit) is even.
  • ๐Ÿงจ Odd Parity: Parity bit is set so that the total number of 1s (including the parity bit) is odd.

๐Ÿ“Š Examples

Data BitsEven Parity BitOdd Parity Bit
101001
110110
100101

โš™๏ธ How Parity Is Computed

๐Ÿ”ง XOR Method (Efficient)

Parity bit = XOR of all data bits

For 8-bit data:

P = Dโ‚€ โŠ• Dโ‚ โŠ• Dโ‚‚ โŠ• Dโ‚ƒ โŠ• Dโ‚„ โŠ• Dโ‚… โŠ• Dโ‚† โŠ• Dโ‚‡
  • Even parity: use result directly
  • Odd parity: invert the result

๐Ÿงฎ Counting Method (Conceptual)

Count the number of 1s:

  • If even โ†’ parity bit = 0 (for even parity)
  • If odd โ†’ parity bit = 1 (for even parity)

๐Ÿงท Visual Anchor: XOR Cascade for 8-bit Parity

Dโ‚€ โ”€โ”ฌโ”€ XOR โ”€โ”ฌโ”€ XOR โ”€โ”ฌโ”€ XOR โ”€โ”ฌโ”€ XOR โ”€โ”ฌโ”€ XOR โ”€โ”ฌโ”€ XOR โ”€โ”ฌโ”€ XOR โ”€โ–บ Parity Bit
    โ”‚       โ”‚       โ”‚       โ”‚       โ”‚       โ”‚       โ”‚
    Dโ‚      Dโ‚‚      Dโ‚ƒ      Dโ‚„      Dโ‚…      Dโ‚†      Dโ‚‡

๐Ÿ›ก๏ธ Error Detection Using Parity

โœ… Detection Steps

  1. Generate parity bit at sender
  2. Transmit data + parity bit
  3. Receiver recomputes parity from received data
  4. Compare with received parity bit

โš ๏ธ Limitations

  • Can detect odd bitflips
  • Cannot detect even bitflips
  • Cannot correct errorsโ€”only detect
Last updated on