Upload
-
View
167
Download
1
Embed Size (px)
Citation preview
Chapter 3Chapter 3
Information Encoding, Errors Information Encoding, Errors Detection and CorrectionDetection and Correction
Data can be corrupted during transmission. For reliable
communication, errors must be detected and corrected.
NoteNote::
10.1 Types of Error10.1 Types of Error
Single-Bit Error
Burst Error
In a single-bit error, only one bit in the data unit has changed.
NoteNote::
10.1 Single-bit error
A burst error means that 2 or more bits in the data unit have changed.
NoteNote::
Burst errors :Burst errors :
Due to external interference like lightning Due to external interference like lightning which last for several seconds.which last for several seconds.
Parity checking method is not useful for Parity checking method is not useful for burst errors.burst errors.
10.2 Burst error of length 5
Types of errorTypes of error
Content errors: Error in the contents of Content errors: Error in the contents of message, 1 may become 0 and vice versamessage, 1 may become 0 and vice versa
Flow integrity errors : missing blocks of Flow integrity errors : missing blocks of
data or delivered to wrong destination.data or delivered to wrong destination.
Error DetectionError Detection
Error detection is the ability to detect the Error detection is the ability to detect the presence of errors caused by noise or presence of errors caused by noise or other impairments during transmission other impairments during transmission from the transmitter to the receiver. from the transmitter to the receiver.
Error correction is the additional ability to Error correction is the additional ability to reconstruct the original, error free data.reconstruct the original, error free data.
Need of error control codeNeed of error control code
Error are introduced during transmission of Error are introduced during transmission of data.data.
Reliability of data transmission is effected Reliability of data transmission is effected due to these errors.due to these errors.
One or more data bits are added to data to One or more data bits are added to data to detect errors.detect errors.
Error control techniquesError control techniques
Error detection techniquesError detection techniques Error correction techniquesError correction techniques
Error detectionError detection
Transmitted code word - Transmitted code word - 1010110010101100 Received code word - Received code word - 1110110011101100 Number of errors - Number of errors - 11 Distance -Distance - 11
FECFEC
Searches for most likely correct keyword.Searches for most likely correct keyword. When error is detected then the distance When error is detected then the distance
between received word and all possible between received word and all possible valid words is measured.valid words is measured.
The nearest valid code word is the most The nearest valid code word is the most likely correct version of the received code likely correct version of the received code word. word.
Backward Error CorrectionBackward Error Correction
Receiver detects error and sends a Receiver detects error and sends a request for retransmission.request for retransmission.
It imposes less bandwidth overhead than It imposes less bandwidth overhead than FEC but requires more time.FEC but requires more time.
It is suitable when errors are less and It is suitable when errors are less and bandwidth needs to be optimized.bandwidth needs to be optimized.
Error detection uses the concept of redundancy, which means adding
extra bits for detecting errors at the destination.
NoteNote::
10.4 Detection methods
ParityParity
MSB is parity bit, other all 7 bits are data MSB is parity bit, other all 7 bits are data bits.bits.
Parity can either even or odd.Parity can either even or odd.
Parity bits Parity bits
Even parity means the number of 1’s in the Even parity means the number of 1’s in the given word including the parity bit should be given word including the parity bit should be even (2, 4, 6, ...)even (2, 4, 6, ...)
Odd parity means the number of 1’s in the Odd parity means the number of 1’s in the given word including the parity bit should be given word including the parity bit should be odd (1, 3, 5, ...)odd (1, 3, 5, ...)
In parity check, a parity bit is added to every data unit so that the total
number of 1s is even (or odd for odd-parity).
NoteNote::
Example 1Example 1
Suppose the sender wants to send the word world. In ASCII the five characters are coded as
1110111 1101111 1110010 1101100 1100100
The following shows the actual bits sent
11101110 11011110 11100100 11011000 11001001
Example 2Example 2
Now suppose the word world in Example 1 is received by the receiver without being corrupted in transmission.
11101110 11011110 11100100 11011000 11001001
The receiver counts the 1s in each character and comes up with even numbers (6, 6, 4, 4, 4). The data are accepted.
Simple parity check can detect all Simple parity check can detect all single-bit errors. It can detect burst single-bit errors. It can detect burst errors only if the total number of errors only if the total number of errors in each data unit is odd.errors in each data unit is odd.
NoteNote::
In two-dimensional parity check, a block of bits is divided into rows and a redundant row of bits is added to the
whole block.
NoteNote::
Figure 10.15 Division in CRC encoder
Figure 10.16 Division in the CRC decoder for two cases
10.8 Binary division in a CRC generator
10.9 Binary division in CRC checker
10.10 A polynomial
10.11 A polynomial representing a divisor
Data unit and checksum
The sender follows these steps:The sender follows these steps:
•The unit is divided into k sections, each of n bits.The unit is divided into k sections, each of n bits.
•All sections are added using one’s complement to get All sections are added using one’s complement to get the sum.the sum.
•The sum is complemented and becomes the checksum.The sum is complemented and becomes the checksum.
•The checksum is sent with the data.The checksum is sent with the data.
NoteNote::
The receiver follows these steps:The receiver follows these steps:
•The unit is divided into k sections, each of n bits.The unit is divided into k sections, each of n bits.
•All sections are added using one’s complement to get All sections are added using one’s complement to get the sum.the sum.
•The sum is complemented.The sum is complemented.
•If the result is zero, the data are accepted: otherwise, If the result is zero, the data are accepted: otherwise, rejected.rejected.
NoteNote::
Example 7Example 7
Suppose the following block of 16 bits is to be sent using a checksum of 8 bits.
10101001 00111001
The numbers are added using one’s complement
10101001
00111001 ------------Sum 11100010
Checksum 00011101
The pattern sent is 10101001 00111001 00011101
Example 8Example 8
Now suppose the receiver receives the pattern sent in Example 7 and there is no error.
10101001 00111001 00011101
When the receiver adds the three sections, it will get all 1s, which, after complementing, is all 0s and shows that there is no error.
10101001
00111001
00011101
Sum 11111111
Complement 00000000 means that the pattern is OK.
Hamming Code:Hamming Code:
To find errors using Hamming code To find errors using Hamming code method we have to use parity check method we have to use parity check method.method.
Parity check method can be even or odd Parity check method can be even or odd parity.parity.
Positions of redundancy bits in Hamming code
10.15 Redundancy bits calculation
THANK YOU!!!THANK YOU!!!