SlideShare a Scribd company logo
1 of 18
Lecture 4 
Error control. 
(2 hours) 
01/01/04 1
Contents 
• Principle of error control 
• Detections 
• Corrections 
• Error detection algorithms 
– Single Parity 
– 2 Dimensional Parity 
– 1st compliment sum 
– Check sum 
01/01/04 2
Coding and Error Control 
• Despite the modulation techniques used, it is possible that the 
data send through a medium is corrupted, by one of the distortion 
sources we discussed earlier. To recover from errors, network 
protocols provide mechanisms, usually implemented at the 
transport or data link layer in the ISO–model. 
• Error Detections: the protocol simply detects the occurrences of 
errors and requires then a retransmission using the time out or a 
negative acknowledgement. 
• Error Correction (Forward Error Correction FEC) are complex and 
costly algorithms that correct some of the errors reported in the 
transmission. 
• Although is subject is very complex and outside the scope of this 
course, we will highlight some basic principles for error detections 
and corrections 
01/01/04 3
Recall!!! 
Binary addition: 
0 + 0 = 0 
0 + 1 = 1 
1 + 0 = 1 
1 + 1 = 10 
Eg: 
1001 
+ 1111 
----------- 
11000 sum 
--------- 
1111 carry 
Binary inverse: 
Inverse of 0 is 1 
Inverse of 1 is 0 
Eg: 
100101101 
011010010 
Modulo-2 / 
XOR operation 
0 + 0 = 0 
0 + 1 = 1 
1 + 0 = 1 
1 + 1 = 0 
Eg: 
1001 
 1111 
----------- 
0110 
01/01/04 4
Parity checks (1) 
• Single parity: This scheme is simple and inexpensive. It 
can only be used for short communication, such as PC to 
a printer connections. It can only detects single errors, 
or an even or an odd number of errors (depending on 
the type of the parity). For instance, for an even parity 
check, an additional parity bit is used to report the 
number of even 1s in the signal. If the number of 1s is 
even the parity bit is set to 0. Obviously, an odd number 
of 1s will be detected. 
• Two-dimensional parity: In this scheme data is 
organised as a matrix and single parities are applied to 
columns and rows. With this approach, some errors can 
be corrected, in addition to detection. 
– Single errors can be detected and corrected 
– Double errors can be detected, but not necessarily corrected. 
– Triple Errors can not be necessarily detected and corrected 
01/01/04 5
01111011 
Sender 
01111011 0 
Single dimensional Parity, example 
01110011 0 
Receiver 
01110011 0 1 
Single Error 
Detected 
01/01/04 6
Two dimensional Parity, example 
0111000110101011 
Sender 
0 1 1 1 1 
0 0 0 1 1 
1 0 1 0 0 
1 0 1 1 1 
0 1 1 1 1 
0 1 1 1 1 
0 0 1 1 1 
1 0 1 0 0 
1 0 1 1 1 
0 1 1 1 1 
Receiver 
0 1 1 1 1 0 
0 0 1 1 1 1 
1 0 1 0 0 0 
1 0 1 1 1 0 
0 1 1 1 1 0 
0 0 1 0 0 1 
01/01/04 7
Two dimensional Parity, example 
0111000110101011 
Sender 
0 1 1 1 1 
0 0 0 1 1 
1 0 1 0 0 
1 0 1 1 1 
0 1 1 1 1 
0 1 1 1 1 
0 0 1 1 1 
1 1 1 0 0 
1 0 1 1 1 
0 1 1 1 1 
Receiver 
0 1 1 1 1 0 
0 0 1 1 1 1 
1 1 1 0 0 1 
1 0 1 1 1 0 
0 1 1 1 1 0 
0 1 1 0 0 0 
Detect two errors, but cannot correct 
01/01/04 8
Two dimensional Parity, example 
0111000110101011 
Sender 
0 1 1 1 1 
0 0 0 1 1 
1 0 1 0 0 
1 0 1 1 1 
0 1 1 1 1 
0 1 1 1 1 
0 1 1 1 1 
1 1 1 0 0 
1 0 1 1 1 
0 1 1 1 1 
Receiver 
0 1 1 1 1 0 
0 1 1 1 1 0 
1 1 1 0 0 1 
1 0 1 1 1 0 
0 1 1 1 1 0 
0 0 1 0 0 1 
Cannot detect 3 errors 
01/01/04 9
Check-summing methods (1) 
• These techniques involve performing some arithmetic 
operation on the m-bit message to produce the r-bit 
check sum. The receiver applied the same operation on 
the check sum and the original message to detect error. 
• 1’s compliment check sum (Internet Check Sum): 
Mainly used in the TCP/UDP protocols for it simplicity. 
• Message is divided into r-fields all fields are added 
together and the final sum is inverted. The same 
operation is applied at the receiver, where the new 
check sum is added to the received one, the result 
should be all 111111111, otherwise an error has 
occurred. 
A A 1 
• The principle of the Arithmetic addition 
01/01/04 10
Message 1’s Compliment Parity, example 
011001 010101 
Sender 
011001 
010101 
101110 
011001 
010101 
010001 
Receiver 
011001 
010101 
010001 
111111 
Error != 11…1 
01/01/04 11
Message 1’s Compliment Parity, example 
0110011001100110 
0101010101010101 
0000111100001111 
Sender 
0110011001100110 
0101010101010101 
0000111100001111 
1100101011001010 
0110001001100110 
0101010101011101 
0000111000001111 
0011010100110101 
Receiver 
0110001001100110 
0101010101011101 
0000111000001111 
0011010100110101 
1111101100000111 
Error != 11…1 
01/01/04 12
Check-summing methods (2) 
• The most popular coding technique used in Ethernet, 
MAC layer is the cyclic redundancy check code (CRC) also 
known as the polynomial code. A generator code is used 
to divide the message, modulo 2 division, then the 
remainder of the division is used as the check sum. 
• The sender calculates r = m%g, using XOR operation, 
where m is the message, g is the polynomial, of degree n 
(the number of bits +1) and r is the reminder. It sends 
(m+r). 
• The receiver computes (m+r)%g = 0, no errors, otherwise 
errors have occurred. 
• The generator are specially chosen, for instance IEEE802 
is a 32 bit code. 
01/01/04 13
Check-summing methods (3) 
• It can be proven that the CRC scheme 
1. Detect single and double errors. 
2. Detect all odd number of errors. 
3. Detect all burst errors <= than the number of 
bits +1 in the generator, n, (IEEE802, burst less 
32 are detected) 
4. Furthermore, the probability that a burst error 
greater than n is not detected is 2-n . For 
generator of 32 bits, this probability that an 
error is not detected is 2-31. 
01/01/04 14
Example 
Message m = 1101011011, Generator g = 10011 degree n=4. 
r = m%g as follows. 
10011 11010110110000 
10011 
010011 
10011 
0000010110 
10011 
0010100 
10011 
001110 
Thus r = 1110, and the full packet will be 1101011011 1110 
01/01/04 15
Animated Example 
10011 110101101100 0 0 
10011 
010011 
10011 
0000010110 
10011 
00101 
00 
10011 
00111 0 
01/01/04 16
At the receiver, the remainder is 
zero, there are no errors. 
11010110111110 
10011 
010011 
10011 
0000010111 
10011 
0010011 
10011 
000000 
At the receiver, the remainder is not 
zero, there are errors. 
10110100111110 
10011 
0010110 
10011 
0010101 
10011 
0011011 
10011 
010001 
10011 
0001010 
01/01/04 17
Quiz 
– What happen when an error is detected by the 
sender? Discuss two possibilities. 
– How many errors can be corrected with 2Dimensional 
parity bits? 
– What is the chance of not detecting an error with a 
generator of 32-bits, in checksum algorithm? 
01/01/04 18

More Related Content

Similar to Lecture 4 errors detection

ERROR_DETECTION.pptx
ERROR_DETECTION.pptxERROR_DETECTION.pptx
ERROR_DETECTION.pptx
BeniamTekeste
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
ZahouAmel1
 
Error detection.
Error detection.Error detection.
Error detection.
Wasim Akbar
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
abdnazar2003
 

Similar to Lecture 4 errors detection (20)

III_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptxIII_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptx
 
Ntdd
NtddNtdd
Ntdd
 
Ntdd
NtddNtdd
Ntdd
 
mod-3-cn-ppt (1).pdf bca bsc btech notes
mod-3-cn-ppt (1).pdf bca bsc btech notesmod-3-cn-ppt (1).pdf bca bsc btech notes
mod-3-cn-ppt (1).pdf bca bsc btech notes
 
Data link layar
Data link layarData link layar
Data link layar
 
Data link layar
Data link layarData link layar
Data link layar
 
ERROR_DETECTION.pptx
ERROR_DETECTION.pptxERROR_DETECTION.pptx
ERROR_DETECTION.pptx
 
Error detection and correction unit-05
Error detection and correction unit-05Error detection and correction unit-05
Error detection and correction unit-05
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
 
Error detection.
Error detection.Error detection.
Error detection.
 
Lecture set 3
Lecture set 3Lecture set 3
Lecture set 3
 
Error control 20
Error control 20Error control 20
Error control 20
 
ERROR DETECTION data communication and computer network.pptx
ERROR DETECTION data communication and computer network.pptxERROR DETECTION data communication and computer network.pptx
ERROR DETECTION data communication and computer network.pptx
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
Satellite error detection and correction presentation
Satellite error detection and correction presentationSatellite error detection and correction presentation
Satellite error detection and correction presentation
 
07 Data Link LayerError Control.pdf
07 Data Link LayerError Control.pdf07 Data Link LayerError Control.pdf
07 Data Link LayerError Control.pdf
 
Error correction and detection th
Error correction and detection thError correction and detection th
Error correction and detection th
 
Computer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdfComputer Networks/Computer Engineering.pdf
Computer Networks/Computer Engineering.pdf
 
COMPUTER NETWORKS UNIT 2
COMPUTER NETWORKS UNIT 2COMPUTER NETWORKS UNIT 2
COMPUTER NETWORKS UNIT 2
 
Error correction error detection in digital communication
Error correction error detection in digital communicationError correction error detection in digital communication
Error correction error detection in digital communication
 

Recently uploaded

Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 

Lecture 4 errors detection

  • 1. Lecture 4 Error control. (2 hours) 01/01/04 1
  • 2. Contents • Principle of error control • Detections • Corrections • Error detection algorithms – Single Parity – 2 Dimensional Parity – 1st compliment sum – Check sum 01/01/04 2
  • 3. Coding and Error Control • Despite the modulation techniques used, it is possible that the data send through a medium is corrupted, by one of the distortion sources we discussed earlier. To recover from errors, network protocols provide mechanisms, usually implemented at the transport or data link layer in the ISO–model. • Error Detections: the protocol simply detects the occurrences of errors and requires then a retransmission using the time out or a negative acknowledgement. • Error Correction (Forward Error Correction FEC) are complex and costly algorithms that correct some of the errors reported in the transmission. • Although is subject is very complex and outside the scope of this course, we will highlight some basic principles for error detections and corrections 01/01/04 3
  • 4. Recall!!! Binary addition: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10 Eg: 1001 + 1111 ----------- 11000 sum --------- 1111 carry Binary inverse: Inverse of 0 is 1 Inverse of 1 is 0 Eg: 100101101 011010010 Modulo-2 / XOR operation 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 Eg: 1001  1111 ----------- 0110 01/01/04 4
  • 5. Parity checks (1) • Single parity: This scheme is simple and inexpensive. It can only be used for short communication, such as PC to a printer connections. It can only detects single errors, or an even or an odd number of errors (depending on the type of the parity). For instance, for an even parity check, an additional parity bit is used to report the number of even 1s in the signal. If the number of 1s is even the parity bit is set to 0. Obviously, an odd number of 1s will be detected. • Two-dimensional parity: In this scheme data is organised as a matrix and single parities are applied to columns and rows. With this approach, some errors can be corrected, in addition to detection. – Single errors can be detected and corrected – Double errors can be detected, but not necessarily corrected. – Triple Errors can not be necessarily detected and corrected 01/01/04 5
  • 6. 01111011 Sender 01111011 0 Single dimensional Parity, example 01110011 0 Receiver 01110011 0 1 Single Error Detected 01/01/04 6
  • 7. Two dimensional Parity, example 0111000110101011 Sender 0 1 1 1 1 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 1 1 Receiver 0 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 01/01/04 7
  • 8. Two dimensional Parity, example 0111000110101011 Sender 0 1 1 1 1 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 Receiver 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 Detect two errors, but cannot correct 01/01/04 8
  • 9. Two dimensional Parity, example 0111000110101011 Sender 0 1 1 1 1 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 Receiver 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 Cannot detect 3 errors 01/01/04 9
  • 10. Check-summing methods (1) • These techniques involve performing some arithmetic operation on the m-bit message to produce the r-bit check sum. The receiver applied the same operation on the check sum and the original message to detect error. • 1’s compliment check sum (Internet Check Sum): Mainly used in the TCP/UDP protocols for it simplicity. • Message is divided into r-fields all fields are added together and the final sum is inverted. The same operation is applied at the receiver, where the new check sum is added to the received one, the result should be all 111111111, otherwise an error has occurred. A A 1 • The principle of the Arithmetic addition 01/01/04 10
  • 11. Message 1’s Compliment Parity, example 011001 010101 Sender 011001 010101 101110 011001 010101 010001 Receiver 011001 010101 010001 111111 Error != 11…1 01/01/04 11
  • 12. Message 1’s Compliment Parity, example 0110011001100110 0101010101010101 0000111100001111 Sender 0110011001100110 0101010101010101 0000111100001111 1100101011001010 0110001001100110 0101010101011101 0000111000001111 0011010100110101 Receiver 0110001001100110 0101010101011101 0000111000001111 0011010100110101 1111101100000111 Error != 11…1 01/01/04 12
  • 13. Check-summing methods (2) • The most popular coding technique used in Ethernet, MAC layer is the cyclic redundancy check code (CRC) also known as the polynomial code. A generator code is used to divide the message, modulo 2 division, then the remainder of the division is used as the check sum. • The sender calculates r = m%g, using XOR operation, where m is the message, g is the polynomial, of degree n (the number of bits +1) and r is the reminder. It sends (m+r). • The receiver computes (m+r)%g = 0, no errors, otherwise errors have occurred. • The generator are specially chosen, for instance IEEE802 is a 32 bit code. 01/01/04 13
  • 14. Check-summing methods (3) • It can be proven that the CRC scheme 1. Detect single and double errors. 2. Detect all odd number of errors. 3. Detect all burst errors <= than the number of bits +1 in the generator, n, (IEEE802, burst less 32 are detected) 4. Furthermore, the probability that a burst error greater than n is not detected is 2-n . For generator of 32 bits, this probability that an error is not detected is 2-31. 01/01/04 14
  • 15. Example Message m = 1101011011, Generator g = 10011 degree n=4. r = m%g as follows. 10011 11010110110000 10011 010011 10011 0000010110 10011 0010100 10011 001110 Thus r = 1110, and the full packet will be 1101011011 1110 01/01/04 15
  • 16. Animated Example 10011 110101101100 0 0 10011 010011 10011 0000010110 10011 00101 00 10011 00111 0 01/01/04 16
  • 17. At the receiver, the remainder is zero, there are no errors. 11010110111110 10011 010011 10011 0000010111 10011 0010011 10011 000000 At the receiver, the remainder is not zero, there are errors. 10110100111110 10011 0010110 10011 0010101 10011 0011011 10011 010001 10011 0001010 01/01/04 17
  • 18. Quiz – What happen when an error is detected by the sender? Discuss two possibilities. – How many errors can be corrected with 2Dimensional parity bits? – What is the chance of not detecting an error with a generator of 32-bits, in checksum algorithm? 01/01/04 18