SlideShare a Scribd company logo
Chapter 10 Error Detection and
Correction
1. Introduction
2. Block Coding
3. Checksum
Type of Errors
Type of Errors
An electromagnetic signal is subject to interference
from heat, magnetism, and other forms of electricity
Single-bit error: 0  1 or 1  0
Burst error: 2 or more bits have changed
10-2
Single-Bit Error
Single-Bit Error
Only one bit of a given data unit is changed
The least likely type of error in serial transmission
Single-bit error can happen in parallel transmission
Dr. Md. Abdur Razzaque
Green Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
10-3
Burst Error
Burst Error
Two or more bits in the data unit have changed
Burst error does not necessarily mean that the errors occur in
consecutive bits
Most likely to happen in a serial transmission
Number of bits affected depends on the data rate and duration of noise
Dr. Md. Abdur Razzaque
Green Networking Research Group
Dept. of Computer Science and Engineering, University of Dhaka
10-4
Redundancy
Redundancy
Error detection uses the concept of redundancy, which
means adding extra (redundant) bits for detecting errors
at the destination
10-5
Error Control
Error Control
Detection Versus Correction
Detection: error ? yes or no
Correction: Need to know the exact number of bits that
are corrupted, and their location in the message
Forward Error Correction Versus Retransmission
Retransmission (resending) : Backward error correction
Coding for redundancy
Block coding: discussed in our textbook
Convolution coding
10-6
Modular Arithmetic
Modular Arithmetic
In modulo-N arithmetic, we use only the integers in the range 0 to N-
1, inclusive.
Adding: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0
Subtracting: 0 – 0 = 0 0 – 1 = 1 1 – 0 = 1 1 – 1 = 0
XORing of two single bits or two words
10-7
Block Coding
Block Coding
Divide the message into blocks, each of
Divide the message into blocks, each of k
k bits, called
bits, called datawords.
datawords.
Add
Add r
r redundant bits to each block to make the length n = k + r. The
redundant bits to each block to make the length n = k + r. The
resulting n-bit blocks are called
resulting n-bit blocks are called codewords
codewords
Example:
Example: 4B/5B block coding
k = 4 and n = 5.
2k
= 16 datawords and 2n
= 32 codewords.
10-8
Error Detection in Block Coding
Error Detection in Block Coding
Example:
Assume that k = 2 and n = 3
(Table 10.1)
10-9
Error Detection: Example
Error Detection: Example
Assume the sender encodes the dataword 01 as 011 and sends it to
the receiver. Consider the following cases:
1. The receiver receives 011 which is a valid codeword. The receiver
extracts the dataword 01 from it.
2. The codeword is corrupted during transmission, and 111 is received.
This is not a valid codeword and is discarded.
3. The codeword is corrupted during transmission, and 000 is received.
This is a valid codeword. The receiver incorrectly extracts the
dataword 00. Two corrupted bits have made the error undetectable.
 An error-detecting code can detect only the types of errors for
which it is designed; other types of errors may remain
undetected
10-10
Error Correction in Block Coding
Error Correction in Block Coding
Example:
Assume that k = 2 and r = 3
n = 5 (Table 10.2)
10-11
Error Correction: Example
Error Correction: Example
Assume the dataword is 01. The sender creates the codeword
01011. The codeword is corrupted during transmission, and 01001
is received. First, the receiver finds that the received codeword is
not in the table. This means an error has occurred. The receiver,
assuming that there is only 1 bit corrupted, uses the following
strategy to guess the correct dataword
1. Comparing the received codeword with the first codeword in the
table (01001 versus 00000), the receiver decides that the first
codeword is not the one that was sent because there are two
different bits. (the same for third or fourth one in the table)
2.. The original codeword must be the second one in the table because
this is the only one that differs from the received codeword by 1 bit.
10-12
Hamming Distance
Hamming Distance
The Hamming distance between two words is the number of
differences between corresponding bits.
Example: Hamming distance d(10101, 11110) is 3
The minimum Hamming distance is the smallest Hamming
distance between all possible pairs in a set of words
Example for Table 10.1
- dmin = 2
10-13
Hamming Distance
Hamming Distance
Three parameters to define the coding schemes
Codeword size n
Dataword size k
The minimum Hamming distance dmin
Coding scheme C(n, k) with a separate expression for dmin
Hamming distance and error
Hamming distance between the received codeword and the sent
codeword is the number of bits that are corrupted
Minimum distance for error detection
To guarantee the detection of up to s errors in all cases, the
minimum Hamming distance in a block code must be
dmin = s + 1.
10-14
Minimum Hamming Distance:
Minimum Hamming Distance:
Example
Example
The minimum Hamming distance in Table 10.1 is 2. This code
guarantees detection of only a single error.
For example, if the third codeword (101) is sent and one error
occurs, the received codeword does not match any valid codeword.
If two errors occur, however, the received codeword may match a
valid codeword and the errors are not detected.
In Table 10.2, it has dmin = 3. This code can detect up to two errors.
When any of the valid codewords is sent, two errors create a
codeword which is not in the table of valid codewords. The receiver
cannot be fooled. However, some combinations of three errors
change a valid codeword to another valid codeword. The receiver
accepts the received codeword and the errors are undetected.
10-15
Checksum
Checksum
Tendency is to replace the checksum with a CRC
Not as strong as CRC in error-checking capability
One’s complement arithmetic
We can represent unsigned numbers between 0 and 2n – 1
using only n bits
If the number has more than n bits, the extra leftmost bits
need to be added to the n rightmost bits (wrapping)
A negative number can be represented by inverting all bits.
It is the same as subtracting the number from 2n
– 1
10-16
Checksum: Example
Checksum: Example
The sender initializes the checksum to 0 and adds all data items
and the checksum. However, 36 cannot be expressed in 4 bits. The
extra two bits are wrapped and added with the sum to create the
wrapped sum value 6. The sum is then complemented, resulting in
the checksum value 9 (15 − 6 = 9).
10-17
Internet Checksum
Internet Checksum
Sender site:
1. The message is divided into 16-bit words.
2. The value of the checksum word is set to 0.
3. All words including the checksum are added using one’s complement
addition.
4. The sum is complemented and becomes the checksum.
5. The checksum is sent with the data.
Receiver site:
1. The message (including checksum) is divided into 16-bit words.
2. All words are added using one’s complement addition.
3. The sum is complemented and becomes the new checksum.
4. If the value of checksum is 0, the message is accepted; otherwise, it is
rejected.
10-18
Internet Checksum: Example
Internet Checksum: Example
10-19

More Related Content

PPTX
Lecture8_Error Detection and Correction 232.pptx
PPT
708112464-Error-detection-and-Correction.ppt
PPT
ch10 Error Detection and Correction.pptttt
PDF
ch010.pdf111111111111111111111111111111111111111111
PPT
PPT
10 Error Detection_and_Correction
PPTX
Chapter 10
PPT
ch10.pptkhgggghiiohguhfyygggyyyttttffffddrdr
Lecture8_Error Detection and Correction 232.pptx
708112464-Error-detection-and-Correction.ppt
ch10 Error Detection and Correction.pptttt
ch010.pdf111111111111111111111111111111111111111111
10 Error Detection_and_Correction
Chapter 10
ch10.pptkhgggghiiohguhfyygggyyyttttffffddrdr

Similar to chap10..................................ppt (20)

PPT
Ch10
PPT
Chapter 10
PPT
Error Detection and Correction
PPT
ch10.ppt
PPT
LECTURE-10 (Data Communication) ~www.fida.com.bd
PDF
Computer Networks/Computer Engineering.pdf
PPT
DCN Slides ch10 Error Detection and Correction.ppt
PPTX
Error Detection and correction concepts in Data communication and networks
PPT
PDF
ch10.pdf
PDF
Error Detection: Computer Networks Chapter 10.pdf
PPT
Error_Detection_and_correction.ppt
PPT
error detection correction
PDF
4_Datalink__Error_Detection_and Correction.pdf
PPT
15CS46 - Data communication or computer networks 1_Module-3.ppt
PPT
ch10.ppt COMPUTER NETWORKS DETAILED POWER POINT
PPTX
Data Link Layer- Error Detection and Control_2.pptx
PPTX
V semester, computer networks BCS502 Module-2_DataLinkLayer
PPT
Ch10 2 v1
Ch10
Chapter 10
Error Detection and Correction
ch10.ppt
LECTURE-10 (Data Communication) ~www.fida.com.bd
Computer Networks/Computer Engineering.pdf
DCN Slides ch10 Error Detection and Correction.ppt
Error Detection and correction concepts in Data communication and networks
ch10.pdf
Error Detection: Computer Networks Chapter 10.pdf
Error_Detection_and_correction.ppt
error detection correction
4_Datalink__Error_Detection_and Correction.pdf
15CS46 - Data communication or computer networks 1_Module-3.ppt
ch10.ppt COMPUTER NETWORKS DETAILED POWER POINT
Data Link Layer- Error Detection and Control_2.pptx
V semester, computer networks BCS502 Module-2_DataLinkLayer
Ch10 2 v1
Ad

Recently uploaded (20)

PDF
Chapter 3 about The site of the first mass
PDF
the saint and devil who dominated the outcasts
PPTX
Presentation on tradtional textiles of kutch
PPTX
CPAR-ELEMENTS AND PRINCIPLE OF ARTS.pptx
PPTX
Understanding Postmodernism Powerpoint.pptx
PDF
Love & Romance in Every Sparkle_ Discover the Magic of Diamond Painting.pdf
PDF
DPSR MUN'25 (U).pdf hhhhhhhhhhhhhbbnhhhh
PPTX
Socio ch 1 characteristics characteristics
PPTX
22 Bindushree Sahu.pptxmadam curie life and achievements
PPTX
G10 HOMEROOM PARENT-TEACHER ASSOCIATION MEETING SATURDAY.pptx
PPTX
Review1_Bollywood_Project analysis of bolywood trends from 1950s to 2025
PPTX
DIMAYUGA ANDEA MAE P. BSED ENG 3-2 (CHAPTER 7).pptx
PPTX
unit5-servicesrelatedtogeneticsinnursing-241221084421-d77c4adb.pptx
PPTX
Slide_Egg-81850-About Us PowerPoint Template Free.pptx
PDF
The-Art-of-Storytelling-in-Cinema (1).pdf
PPTX
Brown and Beige Vintage Scrapbook Idea Board Presentation.pptx.pptx
PPSX
opcua_121710.ppsxthsrtuhrbxdtnhtdtndtyty
PPTX
CMU-PPT-LACHICA-DEFENSE FOR RESEARCH PRESENTATION
PPTX
White Green Simple and Professional Business Pitch Deck Presentation.pptx
PPTX
current by laws xxxxxxxxxxxxxxxxxxxxxxxxxxx
Chapter 3 about The site of the first mass
the saint and devil who dominated the outcasts
Presentation on tradtional textiles of kutch
CPAR-ELEMENTS AND PRINCIPLE OF ARTS.pptx
Understanding Postmodernism Powerpoint.pptx
Love & Romance in Every Sparkle_ Discover the Magic of Diamond Painting.pdf
DPSR MUN'25 (U).pdf hhhhhhhhhhhhhbbnhhhh
Socio ch 1 characteristics characteristics
22 Bindushree Sahu.pptxmadam curie life and achievements
G10 HOMEROOM PARENT-TEACHER ASSOCIATION MEETING SATURDAY.pptx
Review1_Bollywood_Project analysis of bolywood trends from 1950s to 2025
DIMAYUGA ANDEA MAE P. BSED ENG 3-2 (CHAPTER 7).pptx
unit5-servicesrelatedtogeneticsinnursing-241221084421-d77c4adb.pptx
Slide_Egg-81850-About Us PowerPoint Template Free.pptx
The-Art-of-Storytelling-in-Cinema (1).pdf
Brown and Beige Vintage Scrapbook Idea Board Presentation.pptx.pptx
opcua_121710.ppsxthsrtuhrbxdtnhtdtndtyty
CMU-PPT-LACHICA-DEFENSE FOR RESEARCH PRESENTATION
White Green Simple and Professional Business Pitch Deck Presentation.pptx
current by laws xxxxxxxxxxxxxxxxxxxxxxxxxxx
Ad

chap10..................................ppt

  • 1. Chapter 10 Error Detection and Correction 1. Introduction 2. Block Coding 3. Checksum
  • 2. Type of Errors Type of Errors An electromagnetic signal is subject to interference from heat, magnetism, and other forms of electricity Single-bit error: 0  1 or 1  0 Burst error: 2 or more bits have changed 10-2
  • 3. Single-Bit Error Single-Bit Error Only one bit of a given data unit is changed The least likely type of error in serial transmission Single-bit error can happen in parallel transmission Dr. Md. Abdur Razzaque Green Networking Research Group Dept. of Computer Science and Engineering, University of Dhaka 10-3
  • 4. Burst Error Burst Error Two or more bits in the data unit have changed Burst error does not necessarily mean that the errors occur in consecutive bits Most likely to happen in a serial transmission Number of bits affected depends on the data rate and duration of noise Dr. Md. Abdur Razzaque Green Networking Research Group Dept. of Computer Science and Engineering, University of Dhaka 10-4
  • 5. Redundancy Redundancy Error detection uses the concept of redundancy, which means adding extra (redundant) bits for detecting errors at the destination 10-5
  • 6. Error Control Error Control Detection Versus Correction Detection: error ? yes or no Correction: Need to know the exact number of bits that are corrupted, and their location in the message Forward Error Correction Versus Retransmission Retransmission (resending) : Backward error correction Coding for redundancy Block coding: discussed in our textbook Convolution coding 10-6
  • 7. Modular Arithmetic Modular Arithmetic In modulo-N arithmetic, we use only the integers in the range 0 to N- 1, inclusive. Adding: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 Subtracting: 0 – 0 = 0 0 – 1 = 1 1 – 0 = 1 1 – 1 = 0 XORing of two single bits or two words 10-7
  • 8. Block Coding Block Coding Divide the message into blocks, each of Divide the message into blocks, each of k k bits, called bits, called datawords. datawords. Add Add r r redundant bits to each block to make the length n = k + r. The redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called resulting n-bit blocks are called codewords codewords Example: Example: 4B/5B block coding k = 4 and n = 5. 2k = 16 datawords and 2n = 32 codewords. 10-8
  • 9. Error Detection in Block Coding Error Detection in Block Coding Example: Assume that k = 2 and n = 3 (Table 10.1) 10-9
  • 10. Error Detection: Example Error Detection: Example Assume the sender encodes the dataword 01 as 011 and sends it to the receiver. Consider the following cases: 1. The receiver receives 011 which is a valid codeword. The receiver extracts the dataword 01 from it. 2. The codeword is corrupted during transmission, and 111 is received. This is not a valid codeword and is discarded. 3. The codeword is corrupted during transmission, and 000 is received. This is a valid codeword. The receiver incorrectly extracts the dataword 00. Two corrupted bits have made the error undetectable.  An error-detecting code can detect only the types of errors for which it is designed; other types of errors may remain undetected 10-10
  • 11. Error Correction in Block Coding Error Correction in Block Coding Example: Assume that k = 2 and r = 3 n = 5 (Table 10.2) 10-11
  • 12. Error Correction: Example Error Correction: Example Assume the dataword is 01. The sender creates the codeword 01011. The codeword is corrupted during transmission, and 01001 is received. First, the receiver finds that the received codeword is not in the table. This means an error has occurred. The receiver, assuming that there is only 1 bit corrupted, uses the following strategy to guess the correct dataword 1. Comparing the received codeword with the first codeword in the table (01001 versus 00000), the receiver decides that the first codeword is not the one that was sent because there are two different bits. (the same for third or fourth one in the table) 2.. The original codeword must be the second one in the table because this is the only one that differs from the received codeword by 1 bit. 10-12
  • 13. Hamming Distance Hamming Distance The Hamming distance between two words is the number of differences between corresponding bits. Example: Hamming distance d(10101, 11110) is 3 The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words Example for Table 10.1 - dmin = 2 10-13
  • 14. Hamming Distance Hamming Distance Three parameters to define the coding schemes Codeword size n Dataword size k The minimum Hamming distance dmin Coding scheme C(n, k) with a separate expression for dmin Hamming distance and error Hamming distance between the received codeword and the sent codeword is the number of bits that are corrupted Minimum distance for error detection To guarantee the detection of up to s errors in all cases, the minimum Hamming distance in a block code must be dmin = s + 1. 10-14
  • 15. Minimum Hamming Distance: Minimum Hamming Distance: Example Example The minimum Hamming distance in Table 10.1 is 2. This code guarantees detection of only a single error. For example, if the third codeword (101) is sent and one error occurs, the received codeword does not match any valid codeword. If two errors occur, however, the received codeword may match a valid codeword and the errors are not detected. In Table 10.2, it has dmin = 3. This code can detect up to two errors. When any of the valid codewords is sent, two errors create a codeword which is not in the table of valid codewords. The receiver cannot be fooled. However, some combinations of three errors change a valid codeword to another valid codeword. The receiver accepts the received codeword and the errors are undetected. 10-15
  • 16. Checksum Checksum Tendency is to replace the checksum with a CRC Not as strong as CRC in error-checking capability One’s complement arithmetic We can represent unsigned numbers between 0 and 2n – 1 using only n bits If the number has more than n bits, the extra leftmost bits need to be added to the n rightmost bits (wrapping) A negative number can be represented by inverting all bits. It is the same as subtracting the number from 2n – 1 10-16
  • 17. Checksum: Example Checksum: Example The sender initializes the checksum to 0 and adds all data items and the checksum. However, 36 cannot be expressed in 4 bits. The extra two bits are wrapped and added with the sum to create the wrapped sum value 6. The sum is then complemented, resulting in the checksum value 9 (15 − 6 = 9). 10-17
  • 18. Internet Checksum Internet Checksum Sender site: 1. The message is divided into 16-bit words. 2. The value of the checksum word is set to 0. 3. All words including the checksum are added using one’s complement addition. 4. The sum is complemented and becomes the checksum. 5. The checksum is sent with the data. Receiver site: 1. The message (including checksum) is divided into 16-bit words. 2. All words are added using one’s complement addition. 3. The sum is complemented and becomes the new checksum. 4. If the value of checksum is 0, the message is accepted; otherwise, it is rejected. 10-18
  • 19. Internet Checksum: Example Internet Checksum: Example 10-19