SlideShare a Scribd company logo
Chapter 5 Dr. Ali Al-Hamdi 1
Chapter 5
Error Detection and
Correction
Part III: Data-Link Layer
Chapter 5 Dr. Ali Al-Hamdi 2
 Net. criterion related to error occurrence, data form types
applications and error manipulation?
 Error manipulation in data-link layer and in other layers
when frames corrupted between 2 nodes?
 Chapter topics include:
 Errors types, redundancy concept, error detection & correction,
 Block coding discussion and introduction to Hamming distance,
 Cyclic coding discussion, from different perspectives,
 Checksum discussion,
 Forward error discussion.
Lead-in
Chapter 5 Dr. Ali Al-Hamdi 3
 5.1.1 Types of Errors
 Errors causes
 Which type is dominant? Why? Examples?
5.1 Introduction
Chapter 5 Dr. Ali Al-Hamdi 4
 5.1.2 Redundancy
 Definition and goal
 Task of sender and receiver related to redundant bits
 5.1.3 Detection vs. Correction
 Which is more difficult? Why? Examples
 5.1.4 Coding
 At the sender, and at the receiver
 Categories of coding schemes
 Schemes complexity
5.1 Introduction
Chapter 5 Dr. Ali Al-Hamdi 5
5.2 Block Coding
 5.2.1 Concept
 Message division into blocks, each of (k) bits, called
datawords.
 Redundant bits (r) addition to each block to result
codewords, each of (n) bits, n= k + r.
 Since n > k, the number of possible codewords > the
number of possible datawords.
 Since the block coding process is one-to-one, 2k
codewords are used and 2n
− 2k
codewords are not.
Chapter 5 Dr. Ali Al-Hamdi 6
5.2 Block Coding
 5.2.1 Concept
 While used codewords are called valid codewords,
unused codewords are called invalid or illegal
codewords.
 Invalid codewords represent a trick in error detection at
the receiver if a codeworde was corrupted during
transmission.
 How this problem can be solved?
Chapter 5 Dr. Ali Al-Hamdi 7
5.2 Block Coding
 5.2.2 Error Detection
 2 Conditions permitting the receiver to detect errors
 Receiver has a list of valid codewords
 Original codeword has changed to an invalid or valid ones
 Problem with 2nd
condition?
 ED process
Chapter 5 Dr. Ali Al-Hamdi 8
 5.2.2 Error Detection
 Example (1): consider table 10.1 and assume the sender codes
dataword 01 as 011, specify the transmission situation and the
receiver decision if it receives the following cases: 011, 111,
000?
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 9
 5.2.2 Error Detection
 Hamming Distance
 Definition
 Condition
 Why important?
 For example: if the codeword 00000 is sent and 01101 is
received, HD ?
 Logic operator used?
 Example (2)
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 10
 5.2.2 Error Detection
 Minimum Hamming Distance for Error Detection
 Definition
 Concept
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 11
 5.2.2 Error Detection
 Minimum Hamming Distance for Error Detection
 Example (3): in table 10.1, what type of error can be detected
if a codeword is corrupted, and what is the value of dmin?
 Example (4)
if dmin=4, s?
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 12
 5.2.2 Error Detection
 Types: linear and nonlinear, dominant one, why?
 Linear Block Codes
 Required knowledge?
 Definition (based on table 10.1)?
 Example (5): table 10.1 is LBC?
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 13
 5.2.2 Error Detection
 Linear Block Codes
 Minimum Hamming Distance for LBC?
 Example (6): in table 10.1.
 dmin in general and in table (10.1)=? And type of error?
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 14
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 15
 5.2.2 Error Detection
 Linear Block Codes
 Parity-check: encoder & Decoder
 Structure
 Operation
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 16
 5.2.2 Error Detection
 Linear Block Codes: Partity-check encoder & Decoder
 Example (7): assume the sender sends codeword 10111 ,
specify the transmission situation and the receiver decision if
it receives the following cases: 10111, 10011, 10110, 00110,
01011?
5.2 Block Coding
Chapter 5 Dr. Ali Al-Hamdi 17
 5.3.1 Concept
 Definition
 Properties
 4.3.2 Cyclic Redundancy Check (CRC)
 Applications
 (Network-based)
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 18
5.3 Cyclic Codes
 4.3.2 Cyclic Redundancy Check (CRC)
 Structure
 Operation
Chapter 5 Dr. Ali Al-Hamdi 19
5.3 Cyclic Codes
 4.3.2 Cyclic Redundancy Check (CRC)
 Division in encoder
Chapter 5 Dr. Ali Al-Hamdi 20
5.3 Cyclic Codes
 4.3.2 Cyclic Redundancy Check (CRC)
 Division in decoder
 Divisor selection?
Chapter 5 Dr. Ali Al-Hamdi 21
 5.3.3 Polynomials
 Concept
 Benefit?
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 22
 5.3.3 Polynomials
 Degree of polynomial
 Adding and Subtraction Polynomials
 Multiplying or Division Terms or
 Multiplying Two Polynomials
 Dividing One Polynomial By Another
 Shifting
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 23
 5.3.4 Cyclic Code Encoder Using Polynomials

4.1.4 Coding
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 24
 5.3.5 Cyclic Code Analysis
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 25
 5.3.5 Cyclic Code Analysis
 Single-Bit Error
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 26
 5.3.5 Cyclic Code Analysis
 Two Isolated Single-Bit Errors
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 27
 5.3.5 Cyclic Code Analysis
 Two Isolated Single-Bit Errors
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 28
 5.3.5 Cyclic Code Analysis
 Odd Numbers of Errors
 Burst Errors
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 29
 5.3.5 Cyclic Code Analysis
 Burst Errors
 Summary
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 30
 5.3.5 Cyclic Code Analysis
 Standard Polynomials
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 31
 5.3.6 Advantages of Cyclic Codes
 Can detect all types of errors with high performance
 Simple to implement is S/W and H/W
 So, they are used in many networks
 5.6.7 Other Cyclic Codes
 Reed Solomon code for error detection and correction
5.3 Cyclic Codes
Chapter 5 Dr. Ali Al-Hamdi 32
 5.4.1 Generalities
 Definition
 Used in layers
 Operation
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 33
 5.4.2 Concept
 Example (10.11):
 At the sender: message to be sent is of 4-bit numbers=(7, 11, 12, 0, 6).
With sum message=(7, 11, 12, 0, 6, 36)
 At receiver: numbers are added and compare with the sum. If the two are
the same, the numbers are accepted, and discards the sum. Otherwise,
there is an error somewhere and the message is not accepted.
 Drawback?
 Solution: One’s Complement Addition
 Reducing number of bits of sum using
 Example (10.12) =(7, 11, 12, 0, 6, 6)
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 34
 5.4.2 Concept
Solution: One’s Complement Addition
 At sender: add the number in one’s complement to get the sum then
complement to get the checksum. Example (10.13) =(7, 11, 12, 0, 6, 9)
 At receiver: if there is no error (7, 11, 12, 0, 6, 9) is received and add
them in one’s complement to get 15 which is complemented to get 0 .
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 35
 5.4.2 Concept
 Internet Checksum
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 36
 5.4.2 Concept
 Algorithm
 Performance
 Small (16-bit) to large size error
 Not strong as CRC
 Not weighted
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 37
 5.4.3 Other Approaches to Checksum
 Fetcher checksum
 Devised to weight each data item according to its position.
 Two algorithms are proposed: 8-bit and 16-bit.
 The 1st
calculates on 8-bit data items and creates a 16-bit checksum.
 The 2nd
calculates on 16-bit data items and creates a 32-bit checksum.
 The algorithm uses two accumulators: L and R.
 The first adds data items together; the second adds a weight to the
calculation.
 16-bit Fletcher checksum is similar to the 8-bit Fletcher checksum, but it
is calculated over 16-bit data items and creates a 32-bit checksum.
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 38
 5.4.3 Other Approaches to Checksum
 Fetcher checksum
 Algorithm example
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 39
 5.4.3 Other Approaches to Checksum
 Adler checksum
 32-bit checksum
 It is similar to the 16-bit Fletcher with three differences:
 Calculation is done on single bytes instead of 2 bytes at a time.
 The modulus is a prime number (65,521) instead of 65,536.
 L is initialized to 1 instead of 0.
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 40
 5.4.3 Other Approaches to Checksum
 Adler checksum
 Algorithm
5.4 Checksum
Chapter 5 Dr. Ali Al-Hamdi 41
 Usefulness of packet retransmission in RT multimedia?
 5.5.1 Using Hamming Distance
 More distance is needed, dmin= 2t + 1 to correct t errors
 This means a lot of redundant bits need to be sent with the data.
 Example: famous BCH code
5.5 Forward Error Correction
Chapter 5 Dr. Ali Al-Hamdi 42
5.5 Forward Error Correction
5.5.2 Using XOR
Recreating any of data items using exclusive-ORing all of the
items, replacing the one to be created by the result of the previous
operation (R).
This means dividing a packet into N chunks, create the exclusive
OR of all the chunks and send N + 1 chunks.
If any chunk is lost or corrupted, it can be created at the receiver.
 Value of N depends on the # of lost chunks during transmission.
Example: if N = 4, 25 % extra data to correct the data if only one
chunk is lost.
Chapter 5 Dr. Ali Al-Hamdi 43
 5.5.3 Chunk Interleaving
 Concept: missing one packet
5.5 Forward Error Correction
Chapter 5 Dr. Ali Al-Hamdi 44
 5.5.4 Combining Hamming Distance &
Interleaving
 First n-bit packets are created that can correct t-bit errors.
 Then m rows interleaved and send the bits column by column.
 In this way, burst errors up to m × t-bit errors can be corrected
automatically.
5.5 Forward Error Correction
Chapter 5 Dr. Ali Al-Hamdi 45
 5.5.5 Compounding High-and low-resolution
packets
5.5 Forward Error Correction

More Related Content

PDF
Data links
PPTX
Error detection and correction
PPT
13-DataLink_02.ppt
PPTX
Error detection.
PPTX
Parity check, redundancy, and errors
PPT
Chapter 10 Error Detection and Correction 267 10.1 INTRODUCTION 267 Types of ...
PDF
cn computer netwok module 1 computer nep
PPTX
Error Detection and Correction - Data link Layer
Data links
Error detection and correction
13-DataLink_02.ppt
Error detection.
Parity check, redundancy, and errors
Chapter 10 Error Detection and Correction 267 10.1 INTRODUCTION 267 Types of ...
cn computer netwok module 1 computer nep
Error Detection and Correction - Data link Layer

Similar to chapter5 data link layer in data communications and networking.ppt (20)

PPT
Skr+3200+chapter+3+(kweh)
PPTX
Error Detection and correction concepts in Data communication and networks
PPTX
ERROR DETECTION IN DATA COMMUNICATION AND NETWORKING-1.pptx
PPTX
chp2 - data link layer.pptx
PPT
ADC_13_Error_Corc.ppt
PDF
crc_checksum.pdf
PPT
Lecture 4 from virtual university of pakistan
PPTX
Error Detection in Data link layer or Transport layer
PPTX
III_UNIT_ErrorCorrecting.pptx
PDF
07 Data Link LayerError Control.pdf
PPT
computer Networks Error Detection and Correction.ppt
PPTX
DCN Error Detection & Correction
PPT
error detection correction
PPT
Error detection correction (CRC)
PPT
lect5.ppt
PPTX
data link layer - Chapter 3
PDF
1.4.pdf 1.4.pdf 1.4.pdf1.4.pdf1.4.pdf1.4.pdf
PPT
111111111111111111111111111111111111lect5.ppt
PPT
Error correction and detection th
Skr+3200+chapter+3+(kweh)
Error Detection and correction concepts in Data communication and networks
ERROR DETECTION IN DATA COMMUNICATION AND NETWORKING-1.pptx
chp2 - data link layer.pptx
ADC_13_Error_Corc.ppt
crc_checksum.pdf
Lecture 4 from virtual university of pakistan
Error Detection in Data link layer or Transport layer
III_UNIT_ErrorCorrecting.pptx
07 Data Link LayerError Control.pdf
computer Networks Error Detection and Correction.ppt
DCN Error Detection & Correction
error detection correction
Error detection correction (CRC)
lect5.ppt
data link layer - Chapter 3
1.4.pdf 1.4.pdf 1.4.pdf1.4.pdf1.4.pdf1.4.pdf
111111111111111111111111111111111111lect5.ppt
Error correction and detection th
Ad

Recently uploaded (20)

PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PDF
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
PDF
Soil Improvement Techniques Note - Rabbi
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PPT
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
Visual Aids for Exploratory Data Analysis.pdf
PPT
introduction to datamining and warehousing
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
Abrasive, erosive and cavitation wear.pdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PDF
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
UNIT 4 Total Quality Management .pptx
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
Soil Improvement Techniques Note - Rabbi
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
Fundamentals of safety and accident prevention -final (1).pptx
Visual Aids for Exploratory Data Analysis.pdf
introduction to datamining and warehousing
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Abrasive, erosive and cavitation wear.pdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Analyzing Impact of Pakistan Economic Corridor on Import and Export in Pakist...
Information Storage and Retrieval Techniques Unit III
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Ad

chapter5 data link layer in data communications and networking.ppt

  • 1. Chapter 5 Dr. Ali Al-Hamdi 1 Chapter 5 Error Detection and Correction Part III: Data-Link Layer
  • 2. Chapter 5 Dr. Ali Al-Hamdi 2  Net. criterion related to error occurrence, data form types applications and error manipulation?  Error manipulation in data-link layer and in other layers when frames corrupted between 2 nodes?  Chapter topics include:  Errors types, redundancy concept, error detection & correction,  Block coding discussion and introduction to Hamming distance,  Cyclic coding discussion, from different perspectives,  Checksum discussion,  Forward error discussion. Lead-in
  • 3. Chapter 5 Dr. Ali Al-Hamdi 3  5.1.1 Types of Errors  Errors causes  Which type is dominant? Why? Examples? 5.1 Introduction
  • 4. Chapter 5 Dr. Ali Al-Hamdi 4  5.1.2 Redundancy  Definition and goal  Task of sender and receiver related to redundant bits  5.1.3 Detection vs. Correction  Which is more difficult? Why? Examples  5.1.4 Coding  At the sender, and at the receiver  Categories of coding schemes  Schemes complexity 5.1 Introduction
  • 5. Chapter 5 Dr. Ali Al-Hamdi 5 5.2 Block Coding  5.2.1 Concept  Message division into blocks, each of (k) bits, called datawords.  Redundant bits (r) addition to each block to result codewords, each of (n) bits, n= k + r.  Since n > k, the number of possible codewords > the number of possible datawords.  Since the block coding process is one-to-one, 2k codewords are used and 2n − 2k codewords are not.
  • 6. Chapter 5 Dr. Ali Al-Hamdi 6 5.2 Block Coding  5.2.1 Concept  While used codewords are called valid codewords, unused codewords are called invalid or illegal codewords.  Invalid codewords represent a trick in error detection at the receiver if a codeworde was corrupted during transmission.  How this problem can be solved?
  • 7. Chapter 5 Dr. Ali Al-Hamdi 7 5.2 Block Coding  5.2.2 Error Detection  2 Conditions permitting the receiver to detect errors  Receiver has a list of valid codewords  Original codeword has changed to an invalid or valid ones  Problem with 2nd condition?  ED process
  • 8. Chapter 5 Dr. Ali Al-Hamdi 8  5.2.2 Error Detection  Example (1): consider table 10.1 and assume the sender codes dataword 01 as 011, specify the transmission situation and the receiver decision if it receives the following cases: 011, 111, 000? 5.2 Block Coding
  • 9. Chapter 5 Dr. Ali Al-Hamdi 9  5.2.2 Error Detection  Hamming Distance  Definition  Condition  Why important?  For example: if the codeword 00000 is sent and 01101 is received, HD ?  Logic operator used?  Example (2) 5.2 Block Coding
  • 10. Chapter 5 Dr. Ali Al-Hamdi 10  5.2.2 Error Detection  Minimum Hamming Distance for Error Detection  Definition  Concept 5.2 Block Coding
  • 11. Chapter 5 Dr. Ali Al-Hamdi 11  5.2.2 Error Detection  Minimum Hamming Distance for Error Detection  Example (3): in table 10.1, what type of error can be detected if a codeword is corrupted, and what is the value of dmin?  Example (4) if dmin=4, s? 5.2 Block Coding
  • 12. Chapter 5 Dr. Ali Al-Hamdi 12  5.2.2 Error Detection  Types: linear and nonlinear, dominant one, why?  Linear Block Codes  Required knowledge?  Definition (based on table 10.1)?  Example (5): table 10.1 is LBC? 5.2 Block Coding
  • 13. Chapter 5 Dr. Ali Al-Hamdi 13  5.2.2 Error Detection  Linear Block Codes  Minimum Hamming Distance for LBC?  Example (6): in table 10.1.  dmin in general and in table (10.1)=? And type of error? 5.2 Block Coding
  • 14. Chapter 5 Dr. Ali Al-Hamdi 14 5.2 Block Coding
  • 15. Chapter 5 Dr. Ali Al-Hamdi 15  5.2.2 Error Detection  Linear Block Codes  Parity-check: encoder & Decoder  Structure  Operation 5.2 Block Coding
  • 16. Chapter 5 Dr. Ali Al-Hamdi 16  5.2.2 Error Detection  Linear Block Codes: Partity-check encoder & Decoder  Example (7): assume the sender sends codeword 10111 , specify the transmission situation and the receiver decision if it receives the following cases: 10111, 10011, 10110, 00110, 01011? 5.2 Block Coding
  • 17. Chapter 5 Dr. Ali Al-Hamdi 17  5.3.1 Concept  Definition  Properties  4.3.2 Cyclic Redundancy Check (CRC)  Applications  (Network-based) 5.3 Cyclic Codes
  • 18. Chapter 5 Dr. Ali Al-Hamdi 18 5.3 Cyclic Codes  4.3.2 Cyclic Redundancy Check (CRC)  Structure  Operation
  • 19. Chapter 5 Dr. Ali Al-Hamdi 19 5.3 Cyclic Codes  4.3.2 Cyclic Redundancy Check (CRC)  Division in encoder
  • 20. Chapter 5 Dr. Ali Al-Hamdi 20 5.3 Cyclic Codes  4.3.2 Cyclic Redundancy Check (CRC)  Division in decoder  Divisor selection?
  • 21. Chapter 5 Dr. Ali Al-Hamdi 21  5.3.3 Polynomials  Concept  Benefit? 5.3 Cyclic Codes
  • 22. Chapter 5 Dr. Ali Al-Hamdi 22  5.3.3 Polynomials  Degree of polynomial  Adding and Subtraction Polynomials  Multiplying or Division Terms or  Multiplying Two Polynomials  Dividing One Polynomial By Another  Shifting 5.3 Cyclic Codes
  • 23. Chapter 5 Dr. Ali Al-Hamdi 23  5.3.4 Cyclic Code Encoder Using Polynomials  4.1.4 Coding 5.3 Cyclic Codes
  • 24. Chapter 5 Dr. Ali Al-Hamdi 24  5.3.5 Cyclic Code Analysis 5.3 Cyclic Codes
  • 25. Chapter 5 Dr. Ali Al-Hamdi 25  5.3.5 Cyclic Code Analysis  Single-Bit Error 5.3 Cyclic Codes
  • 26. Chapter 5 Dr. Ali Al-Hamdi 26  5.3.5 Cyclic Code Analysis  Two Isolated Single-Bit Errors 5.3 Cyclic Codes
  • 27. Chapter 5 Dr. Ali Al-Hamdi 27  5.3.5 Cyclic Code Analysis  Two Isolated Single-Bit Errors 5.3 Cyclic Codes
  • 28. Chapter 5 Dr. Ali Al-Hamdi 28  5.3.5 Cyclic Code Analysis  Odd Numbers of Errors  Burst Errors 5.3 Cyclic Codes
  • 29. Chapter 5 Dr. Ali Al-Hamdi 29  5.3.5 Cyclic Code Analysis  Burst Errors  Summary 5.3 Cyclic Codes
  • 30. Chapter 5 Dr. Ali Al-Hamdi 30  5.3.5 Cyclic Code Analysis  Standard Polynomials 5.3 Cyclic Codes
  • 31. Chapter 5 Dr. Ali Al-Hamdi 31  5.3.6 Advantages of Cyclic Codes  Can detect all types of errors with high performance  Simple to implement is S/W and H/W  So, they are used in many networks  5.6.7 Other Cyclic Codes  Reed Solomon code for error detection and correction 5.3 Cyclic Codes
  • 32. Chapter 5 Dr. Ali Al-Hamdi 32  5.4.1 Generalities  Definition  Used in layers  Operation 5.4 Checksum
  • 33. Chapter 5 Dr. Ali Al-Hamdi 33  5.4.2 Concept  Example (10.11):  At the sender: message to be sent is of 4-bit numbers=(7, 11, 12, 0, 6). With sum message=(7, 11, 12, 0, 6, 36)  At receiver: numbers are added and compare with the sum. If the two are the same, the numbers are accepted, and discards the sum. Otherwise, there is an error somewhere and the message is not accepted.  Drawback?  Solution: One’s Complement Addition  Reducing number of bits of sum using  Example (10.12) =(7, 11, 12, 0, 6, 6) 5.4 Checksum
  • 34. Chapter 5 Dr. Ali Al-Hamdi 34  5.4.2 Concept Solution: One’s Complement Addition  At sender: add the number in one’s complement to get the sum then complement to get the checksum. Example (10.13) =(7, 11, 12, 0, 6, 9)  At receiver: if there is no error (7, 11, 12, 0, 6, 9) is received and add them in one’s complement to get 15 which is complemented to get 0 . 5.4 Checksum
  • 35. Chapter 5 Dr. Ali Al-Hamdi 35  5.4.2 Concept  Internet Checksum 5.4 Checksum
  • 36. Chapter 5 Dr. Ali Al-Hamdi 36  5.4.2 Concept  Algorithm  Performance  Small (16-bit) to large size error  Not strong as CRC  Not weighted 5.4 Checksum
  • 37. Chapter 5 Dr. Ali Al-Hamdi 37  5.4.3 Other Approaches to Checksum  Fetcher checksum  Devised to weight each data item according to its position.  Two algorithms are proposed: 8-bit and 16-bit.  The 1st calculates on 8-bit data items and creates a 16-bit checksum.  The 2nd calculates on 16-bit data items and creates a 32-bit checksum.  The algorithm uses two accumulators: L and R.  The first adds data items together; the second adds a weight to the calculation.  16-bit Fletcher checksum is similar to the 8-bit Fletcher checksum, but it is calculated over 16-bit data items and creates a 32-bit checksum. 5.4 Checksum
  • 38. Chapter 5 Dr. Ali Al-Hamdi 38  5.4.3 Other Approaches to Checksum  Fetcher checksum  Algorithm example 5.4 Checksum
  • 39. Chapter 5 Dr. Ali Al-Hamdi 39  5.4.3 Other Approaches to Checksum  Adler checksum  32-bit checksum  It is similar to the 16-bit Fletcher with three differences:  Calculation is done on single bytes instead of 2 bytes at a time.  The modulus is a prime number (65,521) instead of 65,536.  L is initialized to 1 instead of 0. 5.4 Checksum
  • 40. Chapter 5 Dr. Ali Al-Hamdi 40  5.4.3 Other Approaches to Checksum  Adler checksum  Algorithm 5.4 Checksum
  • 41. Chapter 5 Dr. Ali Al-Hamdi 41  Usefulness of packet retransmission in RT multimedia?  5.5.1 Using Hamming Distance  More distance is needed, dmin= 2t + 1 to correct t errors  This means a lot of redundant bits need to be sent with the data.  Example: famous BCH code 5.5 Forward Error Correction
  • 42. Chapter 5 Dr. Ali Al-Hamdi 42 5.5 Forward Error Correction 5.5.2 Using XOR Recreating any of data items using exclusive-ORing all of the items, replacing the one to be created by the result of the previous operation (R). This means dividing a packet into N chunks, create the exclusive OR of all the chunks and send N + 1 chunks. If any chunk is lost or corrupted, it can be created at the receiver.  Value of N depends on the # of lost chunks during transmission. Example: if N = 4, 25 % extra data to correct the data if only one chunk is lost.
  • 43. Chapter 5 Dr. Ali Al-Hamdi 43  5.5.3 Chunk Interleaving  Concept: missing one packet 5.5 Forward Error Correction
  • 44. Chapter 5 Dr. Ali Al-Hamdi 44  5.5.4 Combining Hamming Distance & Interleaving  First n-bit packets are created that can correct t-bit errors.  Then m rows interleaved and send the bits column by column.  In this way, burst errors up to m × t-bit errors can be corrected automatically. 5.5 Forward Error Correction
  • 45. Chapter 5 Dr. Ali Al-Hamdi 45  5.5.5 Compounding High-and low-resolution packets 5.5 Forward Error Correction