Error Detection & Correction
Ms.S.Y.Salunkhe
SITCOE,Yadrav
Introduction
 Network must be able to transfer data from one device to
another with acceptable accuracy.
 For most applications, a system must guarantee that the data
received are identical to the data transmitted.
 Any time data are transmitted from one node to the next, they
can become corrupted in passage.
 Many factors can alter one or more bits of a message. Some
applications require a mechanism for detecting and correcting
errors.
 Error detection and Correction has great practical importance
in maintaining data (information) integrity across noisy
communication networks channels and less than reliable
storage media.
Why Error Detection and Correction?
• Because of attenuation, distortion, noise and interferences, errors during
transmission are inevitable, leading to corruption transmitted bits.
• Longer the frame size and higher the probability of single bit error, lower
is the probability
• receiving a frame without error i.e. the probability of receiving a
frame without error increases with the size of the frame and also as d
probability of d single bit error increases.
• This clearly emphasizes the need for error detection and error correction.
Types of Errors
• Whenever bits flow from one point to another, they are subject to
unpredictable changes because of interference. This interference
can change the shape of the signal.
1. Single-Bit Error
2. Burst Error
• Single-Bit Error
The term single-bit error means that only one bits gets corrupted i.e.
only 1 bit of a given data unit (such as a byte, character, or packet) is
changed from 1 to 0 or from 0 to 1. This error is common in parallel
transmission of data. The figure below shows the effect of a single-
bit error on a data unit
Burst (Multiple) Error
• The term burst error means that more than one bits get corrupted
i.e. 2 or more bits in the data unit have changed from 1 to 0 or
from 0 to 1. This error is very common in serial transmission of
data.
• The figure below shows the effect of a burst error on a data unit.
In this case, 0100010001000011 was sent, but 0101110101100011
was received. Note that a burst error does not necessarily mean
that the errors occur in consecutive bits. The length of the burst is
measured from the first corrupted bit to the last corrupted bit.
Some bits in between may not have been corrupted.
Error Detection Techniques
Error detection is sending of additional information so incorrect data
can be detected and rejected. Error detection is the ability to detect the
presence of errors caused by noise or other impairments during
transmission from the transmitter to the receiver.
Error detection uses the concept of redundancy, which means adding
extra bits for detecting error at the destination.
Use of redundancy: To detect or correct errors, we need to send extra
(redundant) bits with data. The extra bits are discarded as soon as the
accuracy of the transmission has been determined.
Thus, redundancy is the basic mechanism for detecting and correcting
errors. Listed below are popular techniques for detecting errors:
· Simple Parity check
· Two-dimensional Parity check
· Checksum and
· Cyclic redundancy check
Simple Parity check
The parity check is the simplest and the most popular error detection scheme. A parity
bit is appended to the original data bits to create an even or odd bit number. The source
then transmits this data via a link, and bits are checked and verified at the destination.
Data is considered accurate if the number of bits (even or odd) matches the number
transmitted from the source. The figure below captures the basic concept of parity
check.
There are 2 types of parity check, namely:
i. Even parity - an even number of bits are 1 Even parity - data: 1010001,
parity bit 1
ii.Odd parity - an odd number of bits are 1 Odd parity - data: 1010111,
parity bit 0
Example :- 1.sender and receiver both agreed on even parity
Supposed what was received by receiver node due to interference or
impairments is this:
Then, Receiver is getting incorrect message because one of the bits had
changed from 1 to 0. But by the time RX counts the number of 1s’ in the
message, will detects there is an error because have odd result instead of
even.
For Odd Parity:
Sender and Receiver both agreed on sending the message with odd parity
i.e. the number of 1s’ and parity but inclusive should be odd. We have:
Supposed what was received by receiver node due to interference or
impairments is this: Single-Bit Error
Receiver will know there is an error because no 1’s in message is even
which ought to be odd based on their agreement.
Multiple (Burst) error:
Receiver not able to detect the error because after counting number of 1s’ in the
message receiver will have odd result which is in line with their agreement.
Advantages
i. Simple parity check can detect all single-bit errors.
ii. It can also detect burst errors, only when the number of bits in error is odd.
Disadvantage
i. The technique is not foolproof against burst errors that invert more than one bit.
Particularly, if even numbers of bits are inverted due to error, the error is not detected. ii.
The receiver cannot specify which bit is/are in error.
To overcome this limitation, two dimensional parity check technique was introduced.
Two-Dimensional Parity Check
• Performance can be improved by using two-dimensional parity check, which
organizes the block of bits in the form of a table.
• Parity check bits are calculated for each row, which is equivalent to a simple
parity check bit.
• Parity check bits are also calculated for all columns.
• Both are sent along with the data.
• At the receiving end these are compared with the parity bits calculated on the
received data.
Advantage
i. It increases the likelihood of detecting burst errors.
ii. Extra overhead is traded for better error detection capability.
Disadvantage
i. If two bits in one data unit are changed and two bits in exactly at same
position in another data unit are changed, the checker cannot detect an error.
Checksum
The data is divided into k segment each of m bits.
The segments are added using ones complement arithmetic to get the sum.
The sum is complemented to get the checksum.
The checksum segment is sent along with the data segments.
The receiver’s end:
All received segments are added using ones complement arithmetic to get the
sum. The sum is complemented.
If the result is zero, the received data is accepted; otherwise discarded.
Advantages
i. The checksum detects all errors involving an odd number of bits.
ii. It also detects most errors involving even number of bits.
iii. Has lesser extra overhead compare to two dimensional parity checks.
Disadvantage
i. If the value of one word is incremented and the value of another
word is decremented by the same amount, the two errors cannot be
detected because the sum and checksum remain the same.
ii. Also if the values of several words are incremented but the total
change is a multiple of 65535, the sum and the checksum does not
change, which means the errors are not detected.
Cyclic Redundancy Check (CRC)
One of the most powerful and commonly used error detecting codes.
• Basic Approach:
- Given a m-bit block of bit sequence, the sender generates an n-bit sequence,
known as a frame check sequence (FCS), so that the resulting frame, consisting
of m+n bits, is exactly divisible by same predetermined number.
- The receiver divides the incoming frame by that number and, if there is no
remainder, assume there was no error
Figure: CRC generator and checker
Advantages
i. CRC can detect all single-bit errors.
ii. CRC can detect all double-bit errors (three 1’s).
iii. CRC can detect any odd number of errors (X + 1).
iv. CRC can detect all burst errors of less than the degree of the polynomial. v.
CRC detects most of the larger burst errors with a high probability.
Error Correction
Error correction is sending of additional information so incorrect data can be
corrected and accepted. Error correction is the additional ability to reconstruct the
original, error-free data.
Two Basic Approaches:
- Backward error correction/correction by retransmission: When an error is
detected in a frame, the sender is asked to retransmit the data/frame. This
approach is known as Automatic Repeat Request (ARQ) technique.
- Forward error correction: is the process in which the receiver tries to guess the
message by using redundant bits. Redundancy is used in the transmitted data to
not only detect but correct error in the received data.
- Key idea:
- - Requirement for error detection: A code is an error-detecting code if and only
if the minimum distance between any two code words is two.
- - Requirement for error correction: For a code to be error-correcting, the
minimum distance between any two code words must more than two.
- - Number of additional bits should such that it can point the position of the bit
in error. If K
- is the number of additional bits, then the condition is 2k > m + k + 1
Hamming Codes
Hamming code is a set of error-correction codes that can be used to detect and correct
bit errors that can occur when computer data is moved or stored.
Calculate Hamming Code by Example
Data: 1001101
Conclusion
Error detecting and correcting codes are essential to computing and all
sorts of communications. To detect or correct errors, we need to send
extra (redundant or parity) bits with data. Error correction is more
tedious than the detection.
Hamming codes is one of the most powerful and assuring techniques out
of the techniques discussed in detecting and correcting errors.

Error correction and detection th

  • 1.
    Error Detection &Correction Ms.S.Y.Salunkhe SITCOE,Yadrav
  • 2.
    Introduction  Network mustbe able to transfer data from one device to another with acceptable accuracy.  For most applications, a system must guarantee that the data received are identical to the data transmitted.  Any time data are transmitted from one node to the next, they can become corrupted in passage.  Many factors can alter one or more bits of a message. Some applications require a mechanism for detecting and correcting errors.  Error detection and Correction has great practical importance in maintaining data (information) integrity across noisy communication networks channels and less than reliable storage media.
  • 3.
    Why Error Detectionand Correction? • Because of attenuation, distortion, noise and interferences, errors during transmission are inevitable, leading to corruption transmitted bits. • Longer the frame size and higher the probability of single bit error, lower is the probability • receiving a frame without error i.e. the probability of receiving a frame without error increases with the size of the frame and also as d probability of d single bit error increases. • This clearly emphasizes the need for error detection and error correction.
  • 4.
    Types of Errors •Whenever bits flow from one point to another, they are subject to unpredictable changes because of interference. This interference can change the shape of the signal. 1. Single-Bit Error 2. Burst Error • Single-Bit Error The term single-bit error means that only one bits gets corrupted i.e. only 1 bit of a given data unit (such as a byte, character, or packet) is changed from 1 to 0 or from 0 to 1. This error is common in parallel transmission of data. The figure below shows the effect of a single- bit error on a data unit
  • 5.
    Burst (Multiple) Error •The term burst error means that more than one bits get corrupted i.e. 2 or more bits in the data unit have changed from 1 to 0 or from 0 to 1. This error is very common in serial transmission of data. • The figure below shows the effect of a burst error on a data unit. In this case, 0100010001000011 was sent, but 0101110101100011 was received. Note that a burst error does not necessarily mean that the errors occur in consecutive bits. The length of the burst is measured from the first corrupted bit to the last corrupted bit. Some bits in between may not have been corrupted.
  • 6.
    Error Detection Techniques Errordetection is sending of additional information so incorrect data can be detected and rejected. Error detection is the ability to detect the presence of errors caused by noise or other impairments during transmission from the transmitter to the receiver. Error detection uses the concept of redundancy, which means adding extra bits for detecting error at the destination. Use of redundancy: To detect or correct errors, we need to send extra (redundant) bits with data. The extra bits are discarded as soon as the accuracy of the transmission has been determined. Thus, redundancy is the basic mechanism for detecting and correcting errors. Listed below are popular techniques for detecting errors: · Simple Parity check · Two-dimensional Parity check · Checksum and · Cyclic redundancy check
  • 8.
    Simple Parity check Theparity check is the simplest and the most popular error detection scheme. A parity bit is appended to the original data bits to create an even or odd bit number. The source then transmits this data via a link, and bits are checked and verified at the destination. Data is considered accurate if the number of bits (even or odd) matches the number transmitted from the source. The figure below captures the basic concept of parity check.
  • 9.
    There are 2types of parity check, namely: i. Even parity - an even number of bits are 1 Even parity - data: 1010001, parity bit 1 ii.Odd parity - an odd number of bits are 1 Odd parity - data: 1010111, parity bit 0 Example :- 1.sender and receiver both agreed on even parity Supposed what was received by receiver node due to interference or impairments is this: Then, Receiver is getting incorrect message because one of the bits had changed from 1 to 0. But by the time RX counts the number of 1s’ in the message, will detects there is an error because have odd result instead of even.
  • 10.
    For Odd Parity: Senderand Receiver both agreed on sending the message with odd parity i.e. the number of 1s’ and parity but inclusive should be odd. We have: Supposed what was received by receiver node due to interference or impairments is this: Single-Bit Error Receiver will know there is an error because no 1’s in message is even which ought to be odd based on their agreement.
  • 11.
    Multiple (Burst) error: Receivernot able to detect the error because after counting number of 1s’ in the message receiver will have odd result which is in line with their agreement. Advantages i. Simple parity check can detect all single-bit errors. ii. It can also detect burst errors, only when the number of bits in error is odd. Disadvantage i. The technique is not foolproof against burst errors that invert more than one bit. Particularly, if even numbers of bits are inverted due to error, the error is not detected. ii. The receiver cannot specify which bit is/are in error. To overcome this limitation, two dimensional parity check technique was introduced.
  • 12.
    Two-Dimensional Parity Check •Performance can be improved by using two-dimensional parity check, which organizes the block of bits in the form of a table. • Parity check bits are calculated for each row, which is equivalent to a simple parity check bit. • Parity check bits are also calculated for all columns. • Both are sent along with the data. • At the receiving end these are compared with the parity bits calculated on the received data.
  • 13.
    Advantage i. It increasesthe likelihood of detecting burst errors. ii. Extra overhead is traded for better error detection capability. Disadvantage i. If two bits in one data unit are changed and two bits in exactly at same position in another data unit are changed, the checker cannot detect an error.
  • 14.
    Checksum The data isdivided into k segment each of m bits. The segments are added using ones complement arithmetic to get the sum. The sum is complemented to get the checksum. The checksum segment is sent along with the data segments.
  • 15.
    The receiver’s end: Allreceived segments are added using ones complement arithmetic to get the sum. The sum is complemented. If the result is zero, the received data is accepted; otherwise discarded.
  • 16.
    Advantages i. The checksumdetects all errors involving an odd number of bits. ii. It also detects most errors involving even number of bits. iii. Has lesser extra overhead compare to two dimensional parity checks. Disadvantage i. If the value of one word is incremented and the value of another word is decremented by the same amount, the two errors cannot be detected because the sum and checksum remain the same. ii. Also if the values of several words are incremented but the total change is a multiple of 65535, the sum and the checksum does not change, which means the errors are not detected.
  • 17.
    Cyclic Redundancy Check(CRC) One of the most powerful and commonly used error detecting codes. • Basic Approach: - Given a m-bit block of bit sequence, the sender generates an n-bit sequence, known as a frame check sequence (FCS), so that the resulting frame, consisting of m+n bits, is exactly divisible by same predetermined number. - The receiver divides the incoming frame by that number and, if there is no remainder, assume there was no error
  • 18.
  • 19.
    Advantages i. CRC candetect all single-bit errors. ii. CRC can detect all double-bit errors (three 1’s). iii. CRC can detect any odd number of errors (X + 1). iv. CRC can detect all burst errors of less than the degree of the polynomial. v. CRC detects most of the larger burst errors with a high probability.
  • 20.
    Error Correction Error correctionis sending of additional information so incorrect data can be corrected and accepted. Error correction is the additional ability to reconstruct the original, error-free data. Two Basic Approaches: - Backward error correction/correction by retransmission: When an error is detected in a frame, the sender is asked to retransmit the data/frame. This approach is known as Automatic Repeat Request (ARQ) technique. - Forward error correction: is the process in which the receiver tries to guess the message by using redundant bits. Redundancy is used in the transmitted data to not only detect but correct error in the received data. - Key idea: - - Requirement for error detection: A code is an error-detecting code if and only if the minimum distance between any two code words is two. - - Requirement for error correction: For a code to be error-correcting, the minimum distance between any two code words must more than two. - - Number of additional bits should such that it can point the position of the bit in error. If K - is the number of additional bits, then the condition is 2k > m + k + 1
  • 21.
    Hamming Codes Hamming codeis a set of error-correction codes that can be used to detect and correct bit errors that can occur when computer data is moved or stored. Calculate Hamming Code by Example Data: 1001101
  • 26.
    Conclusion Error detecting andcorrecting codes are essential to computing and all sorts of communications. To detect or correct errors, we need to send extra (redundant or parity) bits with data. Error correction is more tedious than the detection. Hamming codes is one of the most powerful and assuring techniques out of the techniques discussed in detecting and correcting errors.