SlideShare a Scribd company logo
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 (20)

PPTX
III_UNIT_ErrorCorrecting.pptx
ShantanuDharekar
 
PDF
04_Digital Data Communication Techniques - Part 2.pdf
alyaamohammed251
 
PPTX
Lecture 18.pptx.,.......................
salmannawaz6566504
 
PPTX
Error Detection and Correctiouionvn.pptx
darshannaik55555
 
PPTX
ACchapter 3-Part I Data Communication.pptx
abdisa767
 
PDF
mod-3-cn-ppt (1).pdf bca bsc btech notes
anandhakrishnankv
 
PPT
Dataaaaaaaaaaa aaaaaaaaaaaaaaaaaaayer.ppt
AnsariParvej2
 
PPTX
Data link layar
jaysanshrestha
 
PPTX
Data link layar
jaysanshrestha
 
PDF
اسس شبكات الفصل الثاني اسسس الشبكات الفصل الثاني.
fma561793
 
PPTX
ERROR_DETECTION.pptx
BeniamTekeste
 
PPT
Error detection and correction unit-05
shrinivasgnaik
 
PPTX
9-Lect_9-2.pptx DataLink Layer DataLink Layer
ZahouAmel1
 
PPTX
ERROR DETECTION IN DATA COMMUNICATION AND NETWORKING-1.pptx
Asoa Anaaba Joseph
 
PPTX
Error detection.
Wasim Akbar
 
PDF
Lecture set 3
Gopi Saiteja
 
PPT
15CS46 - Data communication or computer networks 1_Module-3.ppt
ranjan317165
 
PPTX
Error control 20
zulhelman hanafi
 
III_UNIT_ErrorCorrecting.pptx
ShantanuDharekar
 
04_Digital Data Communication Techniques - Part 2.pdf
alyaamohammed251
 
Lecture 18.pptx.,.......................
salmannawaz6566504
 
Error Detection and Correctiouionvn.pptx
darshannaik55555
 
ACchapter 3-Part I Data Communication.pptx
abdisa767
 
mod-3-cn-ppt (1).pdf bca bsc btech notes
anandhakrishnankv
 
Dataaaaaaaaaaa aaaaaaaaaaaaaaaaaaayer.ppt
AnsariParvej2
 
Data link layar
jaysanshrestha
 
Data link layar
jaysanshrestha
 
اسس شبكات الفصل الثاني اسسس الشبكات الفصل الثاني.
fma561793
 
ERROR_DETECTION.pptx
BeniamTekeste
 
Error detection and correction unit-05
shrinivasgnaik
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
ZahouAmel1
 
ERROR DETECTION IN DATA COMMUNICATION AND NETWORKING-1.pptx
Asoa Anaaba Joseph
 
Error detection.
Wasim Akbar
 
Lecture set 3
Gopi Saiteja
 
15CS46 - Data communication or computer networks 1_Module-3.ppt
ranjan317165
 
Error control 20
zulhelman hanafi
 

Recently uploaded (20)

PPTX
Presentation: Climate Citizenship Digital Education
Karl Donert
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
PPTX
How to Manage Promotions in Odoo 18 Sales
Celine George
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PPTX
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PDF
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
PPTX
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
Presentation: Climate Citizenship Digital Education
Karl Donert
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
How to Manage Promotions in Odoo 18 Sales
Celine George
 
community health nursing question paper 2.pdf
Prince kumar
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
Ad

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