Parity

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, for a given set of bits, the occurrences of bits whose value is 1 are 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. In the case of odd parity, the coding is reversed. For a given set of bits, if the count of bits with a value of 1 is even, the parity bit value is set to 1 making the total count of 1s in the whole set (including the parity bit) an odd number. If the count of bits with a value of 1 is odd, the count is already odd so the parity bit's value is 0. Even parity is a special case of a cyclic redundancy check (CRC), where the 1-bit CRC is generated by the polynomial x+1.
If a bit is present at a point otherwise dedicated to a parity bit but is not used for parity, it may be referred to as a mark parity bit if the parity bit is always 1, or a space parity bit if the bit is always 0. In such cases where the value of the bit is constant, it may be called a stick parity bit even though its function has nothing to do with parity. The function of such bits varies with the system design, but examples of functions for such bits include timing management or identification of a packet as being of data or address significance. If its actual bit value is irrelevant to its function, the bit amounts to a don't-care term.

View More On Wikipedia.org
  • 196

    Greg Bernhardt

    A PF Singularity From USA
    • Messages
      19,443
    • Media
      227
    • Reaction score
      10,021
    • Points
      1,237
  • 2

    illuminates

    A PF Atom
    • Messages
      26
    • Reaction score
      0
    • Points
      31
  • 1

    thecommexokid

    A PF Molecule
    • Messages
      70
    • Reaction score
      2
    • Points
      58
  • 1

    blue_leaf77

    A PF Ocean From Tokyo
    • Messages
      2,637
    • Reaction score
      786
    • Points
      306
  • 1

    Nitram

    A PF Quark
    • Messages
      7
    • Reaction score
      0
    • Points
      1
  • 1

    askalot

    A PF Electron
    • Messages
      22
    • Reaction score
      0
    • Points
      11
  • 1

    HanningWu

    A PF Electron
    • Messages
      8
    • Reaction score
      0
    • Points
      11
  • 1

    Sum Guy

    A PF Quark
    • Messages
      21
    • Reaction score
      1
    • Points
      1
  • 1

    MPrestonSparks

    A PF Quark
    • Messages
      8
    • Reaction score
      0
    • Points
      1
  • 1

    MisterX

    A PF Cell From United States
    • Messages
      764
    • Reaction score
      71
    • Points
      113
  • 1

    gvitalie

    A PF Atom
    • Messages
      1
    • Reaction score
      0
    • Points
      34
  • 1

    Incnis Mrsi

    A PF Molecule From Russia
    • Messages
      65
    • Reaction score
      3
    • Points
      61
  • 1

    victorvmotti

    A PF Molecule
    • Messages
      155
    • Reaction score
      5
    • Points
      66
  • 1

    cairoliu

    A PF Molecule
    • Messages
      51
    • Reaction score
      3
    • Points
      58
  • 1

    Joker93

    A PF Molecule From Cyprus
    • Messages
      504
    • Reaction score
      36
    • Points
      77
  • 1

    Jamiemma1995

    A PF Electron
    • Messages
      8
    • Reaction score
      0
    • Points
      11
  • 1

    Markus Kahn

    A PF Electron
    • Messages
      112
    • Reaction score
      14
    • Points
      21
  • 1

    Federica

    A PF Quark
    • Messages
      12
    • Reaction score
      1
    • Points
      6
  • 1

    Callaghan

    A PF Electron
    • Messages
      13
    • Reaction score
      0
    • Points
      11
  • 1

    Aleolomorfo

    A PF Atom
    • Messages
      73
    • Reaction score
      4
    • Points
      36
  • Back
    Top