SlideShare a Scribd company logo
1 of 18
Gandhinagar Institute of Technology
MCWC ALA
Topic: Error Correction and Error Detection
Prepared By:
Tarj Mehta (170120107074)
Guided By: Prof. Parita Shah
Introduction
• For reliable communication, errors must be detected and corrected.
• The data may get corrupted during transmission.
• The data link layer uses some error control mechanism to ensure that
frames (stream of data bits) are transmitted with accuracy.
• In OSI model, error detection and correction are implemented either
at data link layer or transport layer.
TypesofError
Single bit
Multiple bit
Burst
Error Detection
• It uses concept of redundancy, means adding extra bits for detecting
errors at receiving-end.
• There are 3 methods:
1. Parity Check
2. Cyclic redundancy check
3. Checksum
Parity Check
• An extra bit is added at the end of data and number of 1’s remain
even.
• If block has even number of 1’s, 0 is added at the end.
• If block has odd number of 1’s, 1 is added at the end.
• On the receiver side parity bit is computed and check with received
data.
• Sender:
Data: 1 1 0 1 0 0
As it has odd number of 1’s, 1 will be added
With parity: 1 1 0 1 0 0 1
• This will be transmitted via transmitting media.
• Receiver:
Parity bit will be computed.
If parity bit are correct (1 1 0 1 0 0 1) then only data will be accepted
otherwise it will be rejected.
• Disadvantage: Error in more than one bit cannot be detected.
Cyclic Redundancy check
• In this method parity bits are calculated for each row and column and
are sent along with data to the receiver.
• At receiving end these are compared with the parity bits calculated
on the received data.
• Suppose, the given data: 1101101 and divisor: 10101
• Append 4 zeros at the end of data (divisor – 1)
• Division is done by X – OR.
_1110111______
10101 | 11011010000
| 10101
011100
10101
010011
10101
001100
00000
011000
10101
011010 The remainder is not 0, so there is some
10101 error. Now, Append the remainder to data
011110
10101
01011
1110111______
10101| 11011011011
| 10101
011100
10101
010011
10101
001101
00000
011010
10101
011111 As the remainder is 0, the received data is error free
10101
010101
10101
00000
Checksum
• The given data is divided into data segments of k size.
• Each segment is added using 1’s complement method and at the end
they are complemented and the check sum is sent along with data
segments.
• At the receiving end all the segments are added with checksum.
• If the answer is 0, the data is accepted.
• If there is any tampering with the bits, the answer will not be 0 and
error can be detected.
Example
• Question: 10110011 10101011 01011010 11010101
10110011
10101011
1| 01011110
1
01011111
01011010
10111001
11010101
1| 10001111
1
10001111 Now 1’s complement is: 0111000 (checksum)
• Performing the addition again with check sum block…
10110011
10101011
1| 01011110
1
01011111
01011010
10111001
11010101
1| 10001110
1
10001111
01110000
11111111
Complementing this we get 00000000, hence data will be accepted.
Error correction
• It has 1 technique:
1. Hamming code
Hamming Code
• It is a set of error correction codes that can be used to detect and
correct the errors encountered during transmission.
• It has various steps to detect and correct the error.
• Example: A 7bit hamming code is received as 1011011. Assume even
parity and state whether the received code is correct or wrong, if
wrong locate the bit in error.
• Solution: Received Hamming code is
• Step1: Detecting error
Analyzing bits P1 D3 D5 D7 (skip one take one)
1 0 1 1 = odd parity = error exists
Now, keeping P1=1
Step2: Analyzing bits P2 D3 D6 D7
1 0 0 1 = even 1’s = no error
D7 D6 D5 P4 D3 P2 P1
1 0 1 1 0 1 1
• Step3: Analyzing bits P4 D5 D6 D7
1 1 0 1 = odd 1’s = error exists
Keeping P4=1
Here, P4 and P1 are not equal to zero.
Correcting Error: E =
Decimal value for 101 is 5, which shows that 5th bit is error bit.
So, we write correct word by simply inverting 5th bit.
Final answer: 1001011
P4 P2 P1
1 0 1
References
• https://www.youtube.com/watch?v=nUwGf5ZgqsA
• https://www.youtube.com/watch?v=nix346H-RN8
Thank YOU.

More Related Content

What's hot

Error control, parity check, check sum, vrc
Error control, parity check, check sum, vrcError control, parity check, check sum, vrc
Error control, parity check, check sum, vrcHuawei Technologies
 
Error detection and correction unit-05
Error detection and correction unit-05Error detection and correction unit-05
Error detection and correction unit-05shrinivasgnaik
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codesRevathi Subramaniam
 
Cyclic redundancy check
Cyclic redundancy checkCyclic redundancy check
Cyclic redundancy checkSaleh Alrkiyan
 
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 communicationswatihalunde
 
Error correction and detection th
Error correction and detection thError correction and detection th
Error correction and detection thShardaSalunkhe1
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And CorrectionShubham Bammi
 
Presentation on cyclic redundancy check (crc)
Presentation on cyclic redundancy check (crc)Presentation on cyclic redundancy check (crc)
Presentation on cyclic redundancy check (crc)Sudhanshu Srivastava
 
Error Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networksError Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networksNt Arvind
 
Parity bits
Parity bitsParity bits
Parity bitsmrhaken
 
Computer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) pptComputer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) pptSuryaKumarSahani
 
Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)Imesha Perera
 
Digital Data to Digital Signal Conversion
Digital Data to Digital Signal ConversionDigital Data to Digital Signal Conversion
Digital Data to Digital Signal ConversionArafat Hossan
 
Floating point representation
Floating point representationFloating point representation
Floating point representationmissstevenson01
 

What's hot (20)

Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Error control, parity check, check sum, vrc
Error control, parity check, check sum, vrcError control, parity check, check sum, vrc
Error control, parity check, check sum, vrc
 
Error detection and correction unit-05
Error detection and correction unit-05Error detection and correction unit-05
Error detection and correction unit-05
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codes
 
Cyclic redundancy check
Cyclic redundancy checkCyclic redundancy check
Cyclic redundancy check
 
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
 
Check sum
Check sumCheck sum
Check sum
 
Error correction and detection th
Error correction and detection thError correction and detection th
Error correction and detection th
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
 
Presentation on cyclic redundancy check (crc)
Presentation on cyclic redundancy check (crc)Presentation on cyclic redundancy check (crc)
Presentation on cyclic redundancy check (crc)
 
Data Link Layer| Error Detection
Data Link Layer| Error DetectionData Link Layer| Error Detection
Data Link Layer| Error Detection
 
Error Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networksError Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networks
 
Ch11
Ch11Ch11
Ch11
 
Parity bits
Parity bitsParity bits
Parity bits
 
Computer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) pptComputer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) ppt
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
Data encoding
Data encodingData encoding
Data encoding
 
Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)Parity check(Error Detecting Codes)
Parity check(Error Detecting Codes)
 
Digital Data to Digital Signal Conversion
Digital Data to Digital Signal ConversionDigital Data to Digital Signal Conversion
Digital Data to Digital Signal Conversion
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 

Similar to Error detection and Correction

Lecture 4 errors detection
Lecture 4 errors detection Lecture 4 errors detection
Lecture 4 errors detection Josh Street
 
Errror Detection and Correction
Errror Detection and CorrectionErrror Detection and Correction
Errror Detection and CorrectionMahesh Kumar Attri
 
III_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptxIII_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptxShantanuDharekar
 
ERROR_DETECTION.pptx
ERROR_DETECTION.pptxERROR_DETECTION.pptx
ERROR_DETECTION.pptxBeniamTekeste
 
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.pptxgadisaAdamu
 
Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)
Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)
Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)Project Student
 
Error detection.
Error detection.Error detection.
Error detection.Wasim Akbar
 
Information Processes and Technology HSC Communications Unit
Information Processes and Technology HSC Communications UnitInformation Processes and Technology HSC Communications Unit
Information Processes and Technology HSC Communications Unitpezhappy99
 
Computer Organisation and Architecture :Module M-1.pdf
Computer Organisation and Architecture :Module M-1.pdfComputer Organisation and Architecture :Module M-1.pdf
Computer Organisation and Architecture :Module M-1.pdfSushantRaj25
 
Satellite error detection and correction presentation
Satellite error detection and correction presentationSatellite error detection and correction presentation
Satellite error detection and correction presentationAhmedMuhumed2
 
Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)Ammar Shafiq
 

Similar to Error detection and Correction (20)

Lecture 4 errors detection
Lecture 4 errors detection Lecture 4 errors detection
Lecture 4 errors detection
 
Errror Detection and Correction
Errror Detection and CorrectionErrror Detection and Correction
Errror Detection and Correction
 
Ntdd
NtddNtdd
Ntdd
 
Ntdd
NtddNtdd
Ntdd
 
Error.pdf
Error.pdfError.pdf
Error.pdf
 
III_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptxIII_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptx
 
ERROR_DETECTION.pptx
ERROR_DETECTION.pptxERROR_DETECTION.pptx
ERROR_DETECTION.pptx
 
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 Checking and Correction (Parity Bit, Majority Voting, Check Digit)
Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)
Error Checking and Correction (Parity Bit, Majority Voting, Check Digit)
 
Error detection.
Error detection.Error detection.
Error detection.
 
Information Processes and Technology HSC Communications Unit
Information Processes and Technology HSC Communications UnitInformation Processes and Technology HSC Communications Unit
Information Processes and Technology HSC Communications Unit
 
Computer Organisation and Architecture :Module M-1.pdf
Computer Organisation and Architecture :Module M-1.pdfComputer Organisation and Architecture :Module M-1.pdf
Computer Organisation and Architecture :Module M-1.pdf
 
Lecture set 3
Lecture set 3Lecture set 3
Lecture set 3
 
Satellite error detection and correction presentation
Satellite error detection and correction presentationSatellite error detection and correction presentation
Satellite error detection and correction presentation
 
Sak
SakSak
Sak
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 
Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)
 
22BA013 IM.pptx
22BA013 IM.pptx22BA013 IM.pptx
22BA013 IM.pptx
 
Ch 10
Ch 10Ch 10
Ch 10
 
Data link layar
Data link layarData link layar
Data link layar
 

Recently uploaded

Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 

Recently uploaded (20)

young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 

Error detection and Correction

  • 1. Gandhinagar Institute of Technology MCWC ALA Topic: Error Correction and Error Detection Prepared By: Tarj Mehta (170120107074) Guided By: Prof. Parita Shah
  • 2. Introduction • For reliable communication, errors must be detected and corrected. • The data may get corrupted during transmission. • The data link layer uses some error control mechanism to ensure that frames (stream of data bits) are transmitted with accuracy. • In OSI model, error detection and correction are implemented either at data link layer or transport layer.
  • 4. Error Detection • It uses concept of redundancy, means adding extra bits for detecting errors at receiving-end. • There are 3 methods: 1. Parity Check 2. Cyclic redundancy check 3. Checksum
  • 5. Parity Check • An extra bit is added at the end of data and number of 1’s remain even. • If block has even number of 1’s, 0 is added at the end. • If block has odd number of 1’s, 1 is added at the end. • On the receiver side parity bit is computed and check with received data.
  • 6. • Sender: Data: 1 1 0 1 0 0 As it has odd number of 1’s, 1 will be added With parity: 1 1 0 1 0 0 1 • This will be transmitted via transmitting media. • Receiver: Parity bit will be computed. If parity bit are correct (1 1 0 1 0 0 1) then only data will be accepted otherwise it will be rejected. • Disadvantage: Error in more than one bit cannot be detected.
  • 7. Cyclic Redundancy check • In this method parity bits are calculated for each row and column and are sent along with data to the receiver. • At receiving end these are compared with the parity bits calculated on the received data. • Suppose, the given data: 1101101 and divisor: 10101 • Append 4 zeros at the end of data (divisor – 1) • Division is done by X – OR.
  • 8. _1110111______ 10101 | 11011010000 | 10101 011100 10101 010011 10101 001100 00000 011000 10101 011010 The remainder is not 0, so there is some 10101 error. Now, Append the remainder to data 011110 10101 01011
  • 9. 1110111______ 10101| 11011011011 | 10101 011100 10101 010011 10101 001101 00000 011010 10101 011111 As the remainder is 0, the received data is error free 10101 010101 10101 00000
  • 10. Checksum • The given data is divided into data segments of k size. • Each segment is added using 1’s complement method and at the end they are complemented and the check sum is sent along with data segments. • At the receiving end all the segments are added with checksum. • If the answer is 0, the data is accepted. • If there is any tampering with the bits, the answer will not be 0 and error can be detected.
  • 11. Example • Question: 10110011 10101011 01011010 11010101 10110011 10101011 1| 01011110 1 01011111 01011010 10111001 11010101 1| 10001111 1 10001111 Now 1’s complement is: 0111000 (checksum)
  • 12. • Performing the addition again with check sum block… 10110011 10101011 1| 01011110 1 01011111 01011010 10111001 11010101 1| 10001110 1 10001111 01110000 11111111 Complementing this we get 00000000, hence data will be accepted.
  • 13. Error correction • It has 1 technique: 1. Hamming code
  • 14. Hamming Code • It is a set of error correction codes that can be used to detect and correct the errors encountered during transmission. • It has various steps to detect and correct the error. • Example: A 7bit hamming code is received as 1011011. Assume even parity and state whether the received code is correct or wrong, if wrong locate the bit in error.
  • 15. • Solution: Received Hamming code is • Step1: Detecting error Analyzing bits P1 D3 D5 D7 (skip one take one) 1 0 1 1 = odd parity = error exists Now, keeping P1=1 Step2: Analyzing bits P2 D3 D6 D7 1 0 0 1 = even 1’s = no error D7 D6 D5 P4 D3 P2 P1 1 0 1 1 0 1 1
  • 16. • Step3: Analyzing bits P4 D5 D6 D7 1 1 0 1 = odd 1’s = error exists Keeping P4=1 Here, P4 and P1 are not equal to zero. Correcting Error: E = Decimal value for 101 is 5, which shows that 5th bit is error bit. So, we write correct word by simply inverting 5th bit. Final answer: 1001011 P4 P2 P1 1 0 1