Validation and Verification : Parity Check

Parity checks are used during transmission of data to detect errors that have been caused by interference or noise. All data is transmitted as a sequence of 1s and 0s. A common type of error that occurs during data transmission is that a bit is swapped from a 0 to a 1 or a 1 to a 0 by electrical interference. Parity checks detect this type of error. A parity check works like this :

Transmission

1)When data is transmitted each character is encoded as a 7-bit binary number. e.g. the letter ‘B’ has the code 1000011.
2)An eighth bit is added to make a byte. This bit is called a parity bit.
3)

A system can use either even or odd parity -

  • Even Parity : The parity bit is set to make sure there are an even number of 1s and 0s in the byte.
  • Odd Parity : The parity bit is set to make sure there are an odd number of ones and zeros in the byte.

For example in an even parity system a parity bit of 1 would be added to the code for B and it would be transmitted as 11000011.

Reception

1)When a character is received the number of 1s and 0s in the byte are counted :

  • In an even parity system the receiver checks that each received byte contains an even number of 1s and 0s.
  • In an odd parity system the receiver checks that each received byte contains an odd number of 1s and 0s.
2)If this is not the case then an error must have occurred. A request will be sent to the transmitter to ask it to send the byte again.

Parity checks are not very good at detecting burst errors where more than one bit in a byte is changed.

Note : Some examination boards treat a parity check as a verfication check rather than a validation check as the parity check ensures that data is correctly transferred from one location to another.

GCSE ICT Companion 04 - (C) P Meakin 2004