Serial Communications Parity Definition (52196)



The information in this article applies to:
    Microsoft MS-DOS operating system 3.1
    Microsoft MS-DOS operating system 3.2
    Microsoft MS-DOS operating system 3.21
    Microsoft MS-DOS operating system 3.3
    Microsoft MS-DOS operating system 3.3a
    Microsoft MS-DOS operating system 4.0
    Microsoft MS-DOS operating system 4.01
    Microsoft MS-DOS operating system 5.0
    Microsoft MS-DOS operating system 5.0a
    Microsoft MS-DOS operating system 6.0
    Microsoft MS-DOS operating system 6.2
    Microsoft MS-DOS operating system 6.21
    Microsoft MS-DOS operating system 6.22

This article was previously published under Q52196

SUMMARY

In serial communications, the parity bit is used in a simple error detection algorithm. As a stream of data bits is formed, an extra bit, called the parity bit, is added. This bit is set on (1) or off (0), depending on the serial communications parameters set in the UART chip. The following table lists the available parity parameters and their meanings:
   Parameter  Meaning
   ---------  -------

   ODD        Parity bit set so that there is an odd number of 1 bits
   EVEN       Parity bit set so that there is an even number of 1 bits
   NONE       Parity bit is ignored, value is indeterminate
   MARK       Parity bit is ALWAYS set to 1
   SPACE      Parity bit is ALWAYS set to 0

MORE INFORMATION

For the ASCII characters "G" (0x47) and "I" (0x049), the binary equivalents are 00100111 and 00101001. The following table is an example of how a parity bit would be coded for these values (the last bit is used as the parity bit):
              G             I

   ODD   - 001001111     001010010
   EVEN  - 001001110     001010011
   NONE  - 00100111?     00101001?
   MARK  - 001001111     001010011
   SPACE - 001001110     001010010

Modification Type: Major Last Reviewed: 5/12/2003
Keywords: KB52196