Error Detection
Error Detection
• Every byte transmitted has one of its bits allocated as a parity bit.
• The sender and receiver must agree before transmission whether they are
using odd or even parity.
• If odd parity is used then there must be an odd number of 1’s in the byte,
including the parity bit.
• If even parity is used then there must be an even number of 1’s in the byte,
including the parity bit.
• The value of the parity bit is determined by counting the number of 1’s in the
byte, including the parity bit.
• If the number of 1’s does not match the agreed parity then an error has
occurred.
• Parity checks only check that an error has occurred, they do not reveal where the
error(s) occurred.
Even Parity
• Below is an arbitrary binary string:
• If an even parity bit is used then all bits in the byte, including the parity bit,
must add up to an even number.
This means the parity bit must be 0 otherwise the whole byte, including the
parity bit, would add up to five which is an odd number.
Odd Parity
• Below is an arbitrary binary string:
• If an odd parity bit is used then all bits in the byte, including the parity bit,
must add up to an odd number.
There are four 1’s in the byte. This means the parity bit must be a 1 otherwise
the whole byte, including the parity bit, would add up to four which is an even
number.
Check Sum
• A checksum is a value that can be used to determine if data has been corrupted or
altered.
• It indicates whether data differs from its original form but does not specify
where.
• Checksums are calculated using an algorithm and the value is added to the
transmission.
• The receiving device re-calculates the checksum and compares to the original.
• The sender then checks the data to see if any errors occurred during
transmission.
• This method isn’t reliable as an error could have occurred when the sender
transmits the data or when the receiver transmits the data.