SlideShare a Scribd company logo
DATA COMMUNICATION
AND NETWORKING
ERROR CORRECTION AND DETECTION
OBJECTIVES
 To identify the types of errors commonly found in
communication networks.
 To Specify the different error prevention
techniques.
 To perform the simple different types of parity
checking
 To understand the error correction process
Transmission Errors
 Single bit errors
◦ only one bit altered
◦ caused by white noise
 Burst errors
◦ contiguous sequence of B bits in which first last
and any number of intermediate bits in error
◦ caused by impulse noise or by fading in wireless
◦ effect greater at higher data rates
Other errors
◦ Impulse noise – electrical interference
◦ White noise – movement of electrons
◦ Attenuation – loss of signal
◦ Crosstalk – signals interfere
 Inter-modulation noise – combination of
frequencies
◦ Delay distortion – data arrives at different times
◦ Line failure – loss of line
ERROR DETECTION
 Errors can result when data is lost, corrupted, or damaged,
making error control critical
 Error control has two components:
◦ Error Detection
◦ Error Correction
Common error detection methods include;
◦ Parity checking
 50% probability of detection
◦ Longitudinal redundancy checking
 98% probability of detection
◦ Checksum checking
 99.6% probability of detection
Parity Bits and Parity Checking
 Parity checking requires the sender
◦ to compute an additional bit
◦ called a parity bit
◦ and to attach it to each character before
sending
 The receiver
◦ removes the parity bit
◦ performs the same computation as the sender
◦ and verifies that the result agrees with the
Parity bits and parity checking
 The parity computation is chosen such that
◦ if one of the bits in the character is damaged in
transit, the receiver's computation will not agree with
the parity bit
◦ the receiver will report that an error occurred.
 There are two forms of parity
◦ even or odd
◦ both the sender and receiver must agree
Parity Checking
 An extra parity bit is added to the byte
 Assuming even parity:
◦ 10000010 – data sent
10000110 - data received
 Error detected on receiver side (single bit)
◦ 10000010 – data sent
10011010 – data received
 No error detected on receiver side (multiple bit)
 Simple parity detects only single bit errors
Parity checking
 Parity mechanism discussed above
◦ works well to detect a single bit error,
◦ but it cannot detect all possible errors
 There are several alternatives
◦ In each mechanism, the sender transmits additional information along
with the data
◦ and the receiver uses the information to verify
 Differences among the mechanisms arise in three ways:
◦ the size of the additional information
◦ the computational complexity of the algorithm
◦ and the number of bit errors that can be detected
Longitudinal Redundancy
checking
 Longitudinal literally means “lengthwise”
 The sender, for each byte in the message, calculates a
parity value, creating an additional block check character
or BCC
◦ As with parity checking, the parity value is odd or even
 The BCC is added to the end of the message block
 The receiver performs the same lengthwise LRC
computation
 If the receiver’s calculated BCC does not equal the
sender’s calculated BCC, the receiver assumes a
LRC
 01000010 01011001 01010100
01000101 – Before BCC
LRC
01000010 01011001 01010100 01000101 00001010 – After
BCC
The BCC added to the end of the data block.
Checksum checking- CC
 The message sender:
◦ Evaluates each binary byte in the message to its decimal value
◦ Totals the decimal values of all bytes
◦ Divides the total by 255, creating a remainder
◦ Using the remainder for the CC, adds the CC to the end of the
message block
 The message receiver:
◦ Performs the same byte-by-byte calculation and creates his
own CC
◦ Compares his calculated CC to the sender’s
◦ Assumes a transmission error if the two CC values differ
Checksum checking - CC
ERROR CORRECTION
 Correction of detected errors usually requires data
block to be retransmitted
 Not appropriate for wireless applications
◦ bit error rate is high causing lots of retransmissions
◦ when propagation delay long (satellite) compared
with frame transmission time, resulting in
retransmission of frame in error plus many
subsequent frames
 Instead need to correct errors on basis of bits
FLOW CONTROL
 Prevents a sender from overwhelming a receiver with traffic:
◦ A sender and receiver each have a memory (buffer) area in
which they can store frames
◦ A sender can overwhelm, or overflow, a receiver’s memory
buffer without proper flow control
◦ If an overflow occurs, data would likely be lost
 Protocols with flow control mechanism allow multiple PDUs
(protocol data units) in transit at the same time
 PDUs arrive in same order they’re sent
 Two common forms of flow control are:
◦ Stop-and-wait
Each single frame sent requires receipt of one
acknowledgement
◦ Sliding windows
The sending of multiple frames requires a single
acknowledgement returned
Flow control
 Reasons for breaking up a block of data
before transmitting:
◦ Limited buffer size of receiver
◦ Retransmission of PDU due to error
requires smaller amounts of data to be
retransmitted
◦ On shared medium, larger PDUs occupy
medium for extended period, causing
Error control requirements
 Error detection
◦ Receiver detects errors and discards PDUs
 Positive acknowledgement
◦ Destination returns acknowledgment of
received, error-free PDUs
 Retransmission after timeout
◦ Source retransmits unacknowledged PDU
 Negative acknowledgement and
retransmission
◦ Destination returns negative acknowledgment to
PDUs in error
Model of frame transmission
Stop and wait
 Source transmits single frame
 Wait for ACK
 If received frame damaged,
discard it
◦ transmitter has timeout
◦ if no ACK within timeout,
retransmit
 If ACK damaged, transmitter
will not recognize it
◦ transmitter will retransmit
◦ receive gets two copies of frame
◦ use alternate numbering and ACK0 / ACK1
Stop and wait
Most efficient for messages containing a few
large
frames that traverse short links.
Requires one acknowledgement for each frame
sent
 pros and cons
◦ Simple
◦ inefficient
Sliding window flow control
 Sender maintains window of frames it can send
◦ Needs to buffer them for possible retransmission
◦ Window advances with next acknowledgements
 Receiver maintains window of frames it can
receive
◦ Needs to keep buffer space for arrivals
◦ Window advances with in-order arrivals
 Allows multiple numbered frames to be in transit
Sliding window flow control
 If two stations exchange data, each needs to
maintain two windows
one for transmit and one for receive
 Each side needs to send the data and
acknowledgments to the other.
Sliding window flow control
• Most efficient for messages containing many small frames
that traverse long links. Allows for one acknowledgement for
multiple frames
Automatic Repeat Request
(ARQ)
 Collective name for such error control
mechanisms, including:
◦ Go back N
◦ Selective reject (selective retransmission)
Go Back N
 Based on sliding window
 If no error, ACK as usual
 use window to control number of outstanding frames
 Receiver only accepts/acks frames that arrive in order:
◦ Discard that frame and all future frames until error
frame received correctly
◦ Sender times out and resends all outstanding
frames
Go Back N
 Tradeoff made for Go-Back-N:
◦ Simple strategy for receiver; needs only 1
frame
◦ Wastes link bandwidth for errors with
large windows; entire window is
retransmitted
 Damaged Frame
◦ error in frame i so receiver rejects frame i
◦ transmitter retransmits frames from i
Selective reject
 Only rejected frames are retransmitted (Selective
repeat retransmission).Subsequent frames are
accepted by the receiver and buffered. This
minimizes retransmission.
 Receiver must maintain large enough buffer
 more complex logic in transmitter and hence less
widely used. But useful for satellite links with long
propagation delays
Selective reject
 Tradeoff made for Selective Repeat:
◦ More complex than Go-Back-N due to
buffering at receiver and multiple timers at
sender
◦ More efficient use of link bandwidth as only
lost frames are resent (with low error rates)

More Related Content

PPT
Error detection correction (CRC)
PPSX
Error control
PPTX
Guided Transmission Media
PDF
Error detection & correction codes
PPT
Error Detection And Correction
PPTX
Transport layer protocol
PPT
Guided Transmission Media
PPT
Internetworking basics
Error detection correction (CRC)
Error control
Guided Transmission Media
Error detection & correction codes
Error Detection And Correction
Transport layer protocol
Guided Transmission Media
Internetworking basics

What's hot (20)

PPT
Hamming codes
PPTX
Doubly Linked List
PPT
Flow & Error Control
PPTX
Signed Addition And Subtraction
PPTX
Chapter 07 inheritance
PPT
Distance vector routing
PPTX
Arq Protocols
PPT
Data link control
PPTX
Error Detection and Correction - Data link Layer
PDF
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
PPTX
0 1 knapsack using branch and bound
PPTX
Computer network switching
PPT
Data Link Layer| Error Detection
PPTX
Data Structures : hashing (1)
PPT
Network Layer,Computer Networks
PPTX
Multiplication algorithm
PPT
Quick sort data structures
PPTX
Lecture 2 data structures and algorithms
PPTX
Framing in data link layer
PPTX
linked list in Data Structure, Simple and Easy Tutorial
Hamming codes
Doubly Linked List
Flow & Error Control
Signed Addition And Subtraction
Chapter 07 inheritance
Distance vector routing
Arq Protocols
Data link control
Error Detection and Correction - Data link Layer
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
0 1 knapsack using branch and bound
Computer network switching
Data Link Layer| Error Detection
Data Structures : hashing (1)
Network Layer,Computer Networks
Multiplication algorithm
Quick sort data structures
Lecture 2 data structures and algorithms
Framing in data link layer
linked list in Data Structure, Simple and Easy Tutorial
Ad

Similar to Error detection and correction (20)

PPT
5 DLL-LLC- Book
PPTX
ACchapter 3-Part I Data Communication.pptx
PPTX
CN module for the second od momodule.ppt
PDF
Dc ch07 : error control and data link control
PPT
Chapter 4 data link layer
PPTX
Data link layar
PPTX
Data link layar
PPTX
data link layer - Chapter 3
PDF
Unit 2_ Flow & Error Control in computer networks
PDF
Unit 4 data link layer
PPTX
Data link layar
PPT
14-Data Link Control.ppt 14-Data Link Control.ppt 14-Data Link Control.pp
PPTX
Chapter 2.1.1.pptx
PPTX
Error control
PPT
14 data link control
PPTX
Osi model
PPT
computer_network_completenotes_unit2.ppt
PPTX
ERROR DETECTION IN DATA COMMUNICATION AND NETWORKING-1.pptx
PDF
DATA LINK LAYER.pdf
PDF
Data Communication and Computer Networks unit 2
5 DLL-LLC- Book
ACchapter 3-Part I Data Communication.pptx
CN module for the second od momodule.ppt
Dc ch07 : error control and data link control
Chapter 4 data link layer
Data link layar
Data link layar
data link layer - Chapter 3
Unit 2_ Flow & Error Control in computer networks
Unit 4 data link layer
Data link layar
14-Data Link Control.ppt 14-Data Link Control.ppt 14-Data Link Control.pp
Chapter 2.1.1.pptx
Error control
14 data link control
Osi model
computer_network_completenotes_unit2.ppt
ERROR DETECTION IN DATA COMMUNICATION AND NETWORKING-1.pptx
DATA LINK LAYER.pdf
Data Communication and Computer Networks unit 2
Ad

Recently uploaded (20)

PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Well-logging-methods_new................
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Sustainable Sites - Green Building Construction
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
OOP with Java - Java Introduction (Basics)
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
UNIT 4 Total Quality Management .pptx
R24 SURVEYING LAB MANUAL for civil enggi
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Automation-in-Manufacturing-Chapter-Introduction.pdf
Well-logging-methods_new................
Foundation to blockchain - A guide to Blockchain Tech
Sustainable Sites - Green Building Construction
Internet of Things (IOT) - A guide to understanding
additive manufacturing of ss316l using mig welding
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...

Error detection and correction

  • 1. DATA COMMUNICATION AND NETWORKING ERROR CORRECTION AND DETECTION
  • 2. OBJECTIVES  To identify the types of errors commonly found in communication networks.  To Specify the different error prevention techniques.  To perform the simple different types of parity checking  To understand the error correction process
  • 3. Transmission Errors  Single bit errors ◦ only one bit altered ◦ caused by white noise  Burst errors ◦ contiguous sequence of B bits in which first last and any number of intermediate bits in error ◦ caused by impulse noise or by fading in wireless ◦ effect greater at higher data rates
  • 4. Other errors ◦ Impulse noise – electrical interference ◦ White noise – movement of electrons ◦ Attenuation – loss of signal ◦ Crosstalk – signals interfere  Inter-modulation noise – combination of frequencies ◦ Delay distortion – data arrives at different times ◦ Line failure – loss of line
  • 5. ERROR DETECTION  Errors can result when data is lost, corrupted, or damaged, making error control critical  Error control has two components: ◦ Error Detection ◦ Error Correction Common error detection methods include; ◦ Parity checking  50% probability of detection ◦ Longitudinal redundancy checking  98% probability of detection ◦ Checksum checking  99.6% probability of detection
  • 6. Parity Bits and Parity Checking  Parity checking requires the sender ◦ to compute an additional bit ◦ called a parity bit ◦ and to attach it to each character before sending  The receiver ◦ removes the parity bit ◦ performs the same computation as the sender ◦ and verifies that the result agrees with the
  • 7. Parity bits and parity checking  The parity computation is chosen such that ◦ if one of the bits in the character is damaged in transit, the receiver's computation will not agree with the parity bit ◦ the receiver will report that an error occurred.  There are two forms of parity ◦ even or odd ◦ both the sender and receiver must agree
  • 8. Parity Checking  An extra parity bit is added to the byte  Assuming even parity: ◦ 10000010 – data sent 10000110 - data received  Error detected on receiver side (single bit) ◦ 10000010 – data sent 10011010 – data received  No error detected on receiver side (multiple bit)  Simple parity detects only single bit errors
  • 9. Parity checking  Parity mechanism discussed above ◦ works well to detect a single bit error, ◦ but it cannot detect all possible errors  There are several alternatives ◦ In each mechanism, the sender transmits additional information along with the data ◦ and the receiver uses the information to verify  Differences among the mechanisms arise in three ways: ◦ the size of the additional information ◦ the computational complexity of the algorithm ◦ and the number of bit errors that can be detected
  • 10. Longitudinal Redundancy checking  Longitudinal literally means “lengthwise”  The sender, for each byte in the message, calculates a parity value, creating an additional block check character or BCC ◦ As with parity checking, the parity value is odd or even  The BCC is added to the end of the message block  The receiver performs the same lengthwise LRC computation  If the receiver’s calculated BCC does not equal the sender’s calculated BCC, the receiver assumes a
  • 11. LRC  01000010 01011001 01010100 01000101 – Before BCC
  • 12. LRC 01000010 01011001 01010100 01000101 00001010 – After BCC The BCC added to the end of the data block.
  • 13. Checksum checking- CC  The message sender: ◦ Evaluates each binary byte in the message to its decimal value ◦ Totals the decimal values of all bytes ◦ Divides the total by 255, creating a remainder ◦ Using the remainder for the CC, adds the CC to the end of the message block  The message receiver: ◦ Performs the same byte-by-byte calculation and creates his own CC ◦ Compares his calculated CC to the sender’s ◦ Assumes a transmission error if the two CC values differ
  • 15. ERROR CORRECTION  Correction of detected errors usually requires data block to be retransmitted  Not appropriate for wireless applications ◦ bit error rate is high causing lots of retransmissions ◦ when propagation delay long (satellite) compared with frame transmission time, resulting in retransmission of frame in error plus many subsequent frames  Instead need to correct errors on basis of bits
  • 16. FLOW CONTROL  Prevents a sender from overwhelming a receiver with traffic: ◦ A sender and receiver each have a memory (buffer) area in which they can store frames ◦ A sender can overwhelm, or overflow, a receiver’s memory buffer without proper flow control ◦ If an overflow occurs, data would likely be lost  Protocols with flow control mechanism allow multiple PDUs (protocol data units) in transit at the same time  PDUs arrive in same order they’re sent  Two common forms of flow control are: ◦ Stop-and-wait Each single frame sent requires receipt of one acknowledgement ◦ Sliding windows The sending of multiple frames requires a single acknowledgement returned
  • 17. Flow control  Reasons for breaking up a block of data before transmitting: ◦ Limited buffer size of receiver ◦ Retransmission of PDU due to error requires smaller amounts of data to be retransmitted ◦ On shared medium, larger PDUs occupy medium for extended period, causing
  • 18. Error control requirements  Error detection ◦ Receiver detects errors and discards PDUs  Positive acknowledgement ◦ Destination returns acknowledgment of received, error-free PDUs  Retransmission after timeout ◦ Source retransmits unacknowledged PDU  Negative acknowledgement and retransmission ◦ Destination returns negative acknowledgment to PDUs in error
  • 19. Model of frame transmission
  • 20. Stop and wait  Source transmits single frame  Wait for ACK  If received frame damaged, discard it ◦ transmitter has timeout ◦ if no ACK within timeout, retransmit  If ACK damaged, transmitter will not recognize it ◦ transmitter will retransmit ◦ receive gets two copies of frame ◦ use alternate numbering and ACK0 / ACK1
  • 21. Stop and wait Most efficient for messages containing a few large frames that traverse short links. Requires one acknowledgement for each frame sent  pros and cons ◦ Simple ◦ inefficient
  • 22. Sliding window flow control  Sender maintains window of frames it can send ◦ Needs to buffer them for possible retransmission ◦ Window advances with next acknowledgements  Receiver maintains window of frames it can receive ◦ Needs to keep buffer space for arrivals ◦ Window advances with in-order arrivals  Allows multiple numbered frames to be in transit
  • 23. Sliding window flow control  If two stations exchange data, each needs to maintain two windows one for transmit and one for receive  Each side needs to send the data and acknowledgments to the other.
  • 24. Sliding window flow control • Most efficient for messages containing many small frames that traverse long links. Allows for one acknowledgement for multiple frames
  • 25. Automatic Repeat Request (ARQ)  Collective name for such error control mechanisms, including: ◦ Go back N ◦ Selective reject (selective retransmission)
  • 26. Go Back N  Based on sliding window  If no error, ACK as usual  use window to control number of outstanding frames  Receiver only accepts/acks frames that arrive in order: ◦ Discard that frame and all future frames until error frame received correctly ◦ Sender times out and resends all outstanding frames
  • 27. Go Back N  Tradeoff made for Go-Back-N: ◦ Simple strategy for receiver; needs only 1 frame ◦ Wastes link bandwidth for errors with large windows; entire window is retransmitted  Damaged Frame ◦ error in frame i so receiver rejects frame i ◦ transmitter retransmits frames from i
  • 28. Selective reject  Only rejected frames are retransmitted (Selective repeat retransmission).Subsequent frames are accepted by the receiver and buffered. This minimizes retransmission.  Receiver must maintain large enough buffer  more complex logic in transmitter and hence less widely used. But useful for satellite links with long propagation delays
  • 29. Selective reject  Tradeoff made for Selective Repeat: ◦ More complex than Go-Back-N due to buffering at receiver and multiple timers at sender ◦ More efficient use of link bandwidth as only lost frames are resent (with low error rates)