Wednesday, 9 November 2016

Parity bit

  • A Parity bit or check bit, is a bit added to a string of binary code.
  • That indicates whether the 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 bit and odd parity bit.

  • 7 bits of data Count of 1-bits even parity total 8 bits odd parity total 8 bits
    0000000 0 00000000 00000001
    1010001 3 10100011 10100010
    "If the count of one's is a odd number then odd parity sets the last bit to 0 & even parity sets the last bit to 1"
    "If the count of one's is a even number then odd parity sets the last bit to 1 & even parity sets the last bit to 1"

    Type of bit parity Successful transmission scenario
    even A wants to transmit:1001
    A computes parity bit value: 1+0+0+1(mod2)=0
    A adds parity bit and sends: 10010
    B receives: 10010
    B Computes overall parity 1+0+0+1+0(mod2)=0
    B reports correct transmission after observing expected even result.
    odd A wants to transmit:1001
    A computes parity bit value: 1+0+0+1+1(mod2)=1
    A adds parity bit and sends: 10011
    B receives: 10011
    B Computes overall parity 1+0+0+1+1(mod2)=1
    B reports correct transmission after observing expected odd result.

    Notes