SlideShare una empresa de Scribd logo
1 de 25
DATA COMMUNICATIONS &
NETWORKING
LECTURE-
21
Course Instructor : Sehrish Rafiq
Department Of Computer Science
University Of Peshawar
LECTURE OVERVIEW
 CRC
 Performance of CRC
 Checksum
 Performance of Checksum
ERROR DETECTION METHODS
CYCLIC REDUNDANCY CHECK
 The third and the most powerful technique is CRC.
 CRC is based on binary division.
 In CRC a sequence of redundant bits called the CRC
or CRC remainder is appended to the end of a data
unit.
 So that the resulting data unit becomes exactly
divisible by a second, predetermined binary number.
 At the destination, the incoming data unit is divided
by the same number.
CYCLIC REDUNDANCY CHECK
 If at this step there is no remainder the data unit
is assumed to be intact and is accepted.
 A remainder indicates that the data unit has
been damaged in transit and therefore must be
rejected.
REDUNDANCY BITS
 The redundancy bits used by CRC are derived by
dividing the data unit by a predetermined
divisor,the remainder is the CRC.
 To be valid, a CRC must have two qualities.
 It must have exactly one less bit than the divisor.
 Appending it to the end of the data string must
make the resulting bit sequence exactly divisible
by the divisor.
CRC GENERATOR & CHECKER
BINARY DIVISION IN A CRC
GENERATOR
BINARY DIVISION IN CRC
CHECKER
HOW IT WORKS???
 At the Transmitter:
 Step 1: A string of n 0’s is appended to the data
unit.
 The number n is 1 less than the number of bits in the
predetermined divisor which is n+1 bits.
 Step 2: The newly elongated data unit is divided
by the divisor using a process called binary
division.
 The remainder resulting from this division is the CRC.
 Step 3: The CRC derived in step 2 replaces the
appended 0’s at the end of the data unit.
HOW IT WORKS???
 At the receiver:
 The data unit arrives at the receiver data first
followed by the CRC.
 Step 1: The receiver treats the whole string as a
unit and divides it by the same divisor that was
used to find the CRC remainder.
 Result:
 If the string arrives without error ,the CRC checker yields
a remainder of 0 and the data unit passes.
 If the string has been changed in transit ,the division
yields a non zero remainder and the string passes.
THE CRC DIVISOR
 The divisor in the CRC generator is most often
represented not as a string of 1’s and 0’s but as
an algebraic polynomial.
 A polynomial should be selected to have at least
the following properties:
 It should not be divisible by x.
 It should be divisible by x+1.
 E.g.
A POLYNOMIAL
REPRESENTING A DIVISOR
STANDARD POLYNOMIALS
Name Polynomial Application
CRC-8CRC-8 x8
+ x2
+ x + 1 ATM header
CRC-10CRC-10 x10
+ x9
+ x5
+ x4
+ x2
+ 1 ATM AAL
ITU-16ITU-16 x16
+ x12
+ x5
+ 1 HDLC
ITU-32ITU-32
x32
+ x26
+ x23
+ x22
+ x16
+ x12
+ x11
+ x10
+ x8
+ x7
+ x5
+ x4
+ x2
+ x + 1
LANs
PERFORMANCE OF CRC
 CRC can detect all burst errors that effect an
odd number of bits.
 CRC can detect all burst errors of length less
than or equal to the degree of polynomial.
 CRC can detect with a very high probability
,burst errors of length greater than the degree of
polynomial.
CHECKSUM
 The checksum is also based on the concept of
redundancy.
CHECKSUM GENERATOR
 The sender follows these steps:
 Step 1: The unit is divided in to k sections, each
of n bits.
 Step 2: All sections are added using one’s
complement to get the sum in such a way that
the total is also n bits long.
 Step 3: The sum is then complemented and
becomes the checksum.
 Step 4: The checksum is sent with the data.
CHECKSUM CHECKER
 The sender follows these steps:
 Step 1: The unit is divided in to k sections, each
of n bits.
 Step 2: All sections are added using one’s
complement to get the sum in such a way that
the total is also n bits long.

 Step 3: The sum is then complemented.
 Step 4: If the result is zero, the data are
accepted, otherwise they are rejected.
CHECKSUM
DATA UNIT AND CHECKSUM
Example 1Example 1
Suppose the following block of 16 bits is to be sent using a
checksum of 8 bits.
10101001 00111001
The numbers are added using one’s complement
10101001
00111001
------------
Sum 11100010
Checksum 00011101
The pattern sent is 10101001 00111001 00011101
EXAMPLE 1 CONTINUED…
Now suppose the receiver receives the pattern sent and there is no
error.
10101001 00111001 00011101
When the receiver adds the three sections, it will get all 1s, which,
after complementing, is all 0s and shows that there is no error.
10101001
00111001
00011101
Sum 11111111
Complement 00000000 means that the pattern is OK.
EXAMPLE 1 CONTINUED…
Now suppose there is a burst error of length 5 that affects 4
bits.
10101111 11111001 00011101
When the receiver adds the three sections, it gets
10101111
11111001
00011101
Partial Sum 1 11000101
Carry 1
Sum 11000110
Complement 00111001 the pattern is corrupted.
PERFORMANCE OF CHECKSUM
 The checksum detects all errors involving an odd
number of bits as well as most errors involving
an even number of bits.
 However if one or more bits of a segment are
damaged and the corresponding bit or bits of
opposite value in a second segment are also
damaged,the sums of those columns will not
change and the receiver will not detect a
problem.
 Checksum retains all carriers, so although two 0s
becoming 1 would not alter the value of their own
column,it would change the value of the next
higher column.
THANKS!!!

Más contenido relacionado

La actualidad más candente

Ethernet and token ring
Ethernet and token ringEthernet and token ring
Ethernet and token ring
Abhijeet Shah
 

La actualidad más candente (20)

Number systems ppt
Number systems pptNumber systems ppt
Number systems ppt
 
TOKEN BUS & TOKEN RING.ppt
TOKEN BUS & TOKEN RING.pptTOKEN BUS & TOKEN RING.ppt
TOKEN BUS & TOKEN RING.ppt
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
 
Error control
Error controlError control
Error control
 
Computer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error CorrectionComputer Networks - Error Detection & Error Correction
Computer Networks - Error Detection & Error Correction
 
Checksum explaination
Checksum explainationChecksum explaination
Checksum explaination
 
DCN Error Detection & Correction
DCN Error Detection & CorrectionDCN Error Detection & Correction
DCN Error Detection & Correction
 
DLL
DLLDLL
DLL
 
Error detection and correction unit-05
Error detection and correction unit-05Error detection and correction unit-05
Error detection and correction unit-05
 
What is Gray Code?
What is Gray Code? What is Gray Code?
What is Gray Code?
 
Digital Search Tree
Digital Search TreeDigital Search Tree
Digital Search Tree
 
Ethernet and token ring
Ethernet and token ringEthernet and token ring
Ethernet and token ring
 
Computer Security Lecture 5: Simplified Advanced Encryption Standard
Computer Security Lecture 5: Simplified Advanced Encryption StandardComputer Security Lecture 5: Simplified Advanced Encryption Standard
Computer Security Lecture 5: Simplified Advanced Encryption Standard
 
Extendible hashing
Extendible hashingExtendible hashing
Extendible hashing
 
Booth's Multiplication Algorithm.pptx
Booth's Multiplication Algorithm.pptxBooth's Multiplication Algorithm.pptx
Booth's Multiplication Algorithm.pptx
 
Mobile Computing (Part-2)
Mobile Computing (Part-2)Mobile Computing (Part-2)
Mobile Computing (Part-2)
 
Chap 5 analog transmission
Chap 5 analog transmissionChap 5 analog transmission
Chap 5 analog transmission
 
Hamming codes
Hamming codesHamming codes
Hamming codes
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Check sum
Check sumCheck sum
Check sum
 

Destacado

Data Communications and Networking Lecture 16
Data Communications and Networking Lecture 16Data Communications and Networking Lecture 16
Data Communications and Networking Lecture 16
Sehrish Rafiq
 
OperacióN Binaria
OperacióN BinariaOperacióN Binaria
OperacióN Binaria
guest3c75fbe
 
05 directnets errors
05 directnets errors05 directnets errors
05 directnets errors
jyang1983
 

Destacado (20)

Lecture 06
Lecture 06Lecture 06
Lecture 06
 
Lecture 19
Lecture 19Lecture 19
Lecture 19
 
Checksum 101
Checksum 101Checksum 101
Checksum 101
 
Lecture 24
Lecture 24Lecture 24
Lecture 24
 
Lecture 03
Lecture 03Lecture 03
Lecture 03
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 07
Lecture 07Lecture 07
Lecture 07
 
Data Communications and Networking Lecture 16
Data Communications and Networking Lecture 16Data Communications and Networking Lecture 16
Data Communications and Networking Lecture 16
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Data communication - Lecture-01
Data communication - Lecture-01 Data communication - Lecture-01
Data communication - Lecture-01
 
Powerpoint for data communication
Powerpoint for data communication Powerpoint for data communication
Powerpoint for data communication
 
Data communication (simple explanation)
Data communication (simple explanation)Data communication (simple explanation)
Data communication (simple explanation)
 
Chapter 1: Introduction to Data Communication and Networks
Chapter 1: Introduction to Data Communication and NetworksChapter 1: Introduction to Data Communication and Networks
Chapter 1: Introduction to Data Communication and Networks
 
OperacióN Binaria
OperacióN BinariaOperacióN Binaria
OperacióN Binaria
 
05 directnets errors
05 directnets errors05 directnets errors
05 directnets errors
 
Cyclic redundancy check
Cyclic redundancy checkCyclic redundancy check
Cyclic redundancy check
 
Lecture 23
Lecture 23Lecture 23
Lecture 23
 

Similar a Lecture 21

Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)
Ammar Shafiq
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
ZahouAmel1
 
Error detection.
Error detection.Error detection.
Error detection.
Wasim Akbar
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
Sisir Ghosh
 
computer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.pptcomputer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.ppt
Jayaprasanna4
 

Similar a Lecture 21 (20)

Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)
 
III_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptxIII_UNIT_ErrorCorrecting.pptx
III_UNIT_ErrorCorrecting.pptx
 
Computer Networks Module II
Computer Networks Module IIComputer Networks Module II
Computer Networks Module II
 
Data link layar
Data link layarData link layar
Data link layar
 
Data link layar
Data link layarData link layar
Data link layar
 
B0210714
B0210714B0210714
B0210714
 
computer networks Error Detection Methods.pdf
computer networks Error Detection Methods.pdfcomputer networks Error Detection Methods.pdf
computer networks Error Detection Methods.pdf
 
Error Control In Network Layer
Error Control In Network LayerError Control In Network Layer
Error Control In Network Layer
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
 
Error detection.
Error detection.Error detection.
Error detection.
 
07 Data Link LayerError Control.pdf
07 Data Link LayerError Control.pdf07 Data Link LayerError Control.pdf
07 Data Link LayerError Control.pdf
 
Ch3 datalink
Ch3 datalinkCh3 datalink
Ch3 datalink
 
Ch 10
Ch 10Ch 10
Ch 10
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
Error control 20
Error control 20Error control 20
Error control 20
 
Error detection techniques
Error detection techniquesError detection techniques
Error detection techniques
 
Cyclic Redundancy Check in Computers Network
Cyclic Redundancy Check in Computers Network Cyclic Redundancy Check in Computers Network
Cyclic Redundancy Check in Computers Network
 
Error.pdf
Error.pdfError.pdf
Error.pdf
 
COMPUTER NETWORKS UNIT 2
COMPUTER NETWORKS UNIT 2COMPUTER NETWORKS UNIT 2
COMPUTER NETWORKS UNIT 2
 
computer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.pptcomputer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.ppt
 

Más de Sehrish Rafiq

Más de Sehrish Rafiq (18)

Introduction to Computers Lecture # 14
Introduction to Computers Lecture # 14Introduction to Computers Lecture # 14
Introduction to Computers Lecture # 14
 
Introduction to Computers Lecture # 13
Introduction to Computers Lecture # 13Introduction to Computers Lecture # 13
Introduction to Computers Lecture # 13
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
 
Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11Introduction to Computers Lecture # 11
Introduction to Computers Lecture # 11
 
Introduction to Computers Lecture # 10
Introduction to Computers Lecture # 10Introduction to Computers Lecture # 10
Introduction to Computers Lecture # 10
 
Introduction to Computers Lecture # 9
Introduction to Computers Lecture # 9Introduction to Computers Lecture # 9
Introduction to Computers Lecture # 9
 
Introduction to Computers Lecture # 8
Introduction to Computers Lecture # 8Introduction to Computers Lecture # 8
Introduction to Computers Lecture # 8
 
Introduction to Computers Lecture # 7
Introduction to Computers Lecture # 7Introduction to Computers Lecture # 7
Introduction to Computers Lecture # 7
 
Introduction to computers Lecture # 4
Introduction to computers Lecture # 4Introduction to computers Lecture # 4
Introduction to computers Lecture # 4
 
Introduction to Computers Lecture # 5
Introduction to Computers Lecture # 5Introduction to Computers Lecture # 5
Introduction to Computers Lecture # 5
 
Introduction to Computers Lecture # 3
Introduction to Computers Lecture # 3Introduction to Computers Lecture # 3
Introduction to Computers Lecture # 3
 
Introduction to Computers Lecture # 2
Introduction to Computers Lecture # 2Introduction to Computers Lecture # 2
Introduction to Computers Lecture # 2
 
Introduction to Computers Lecture # 1
Introduction to Computers Lecture # 1Introduction to Computers Lecture # 1
Introduction to Computers Lecture # 1
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
Lecture 20
Lecture 20Lecture 20
Lecture 20
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Lecture 21

  • 1. DATA COMMUNICATIONS & NETWORKING LECTURE- 21 Course Instructor : Sehrish Rafiq Department Of Computer Science University Of Peshawar
  • 2. LECTURE OVERVIEW  CRC  Performance of CRC  Checksum  Performance of Checksum
  • 4. CYCLIC REDUNDANCY CHECK  The third and the most powerful technique is CRC.  CRC is based on binary division.  In CRC a sequence of redundant bits called the CRC or CRC remainder is appended to the end of a data unit.  So that the resulting data unit becomes exactly divisible by a second, predetermined binary number.  At the destination, the incoming data unit is divided by the same number.
  • 5. CYCLIC REDUNDANCY CHECK  If at this step there is no remainder the data unit is assumed to be intact and is accepted.  A remainder indicates that the data unit has been damaged in transit and therefore must be rejected.
  • 6. REDUNDANCY BITS  The redundancy bits used by CRC are derived by dividing the data unit by a predetermined divisor,the remainder is the CRC.  To be valid, a CRC must have two qualities.  It must have exactly one less bit than the divisor.  Appending it to the end of the data string must make the resulting bit sequence exactly divisible by the divisor.
  • 7. CRC GENERATOR & CHECKER
  • 8. BINARY DIVISION IN A CRC GENERATOR
  • 9. BINARY DIVISION IN CRC CHECKER
  • 10. HOW IT WORKS???  At the Transmitter:  Step 1: A string of n 0’s is appended to the data unit.  The number n is 1 less than the number of bits in the predetermined divisor which is n+1 bits.  Step 2: The newly elongated data unit is divided by the divisor using a process called binary division.  The remainder resulting from this division is the CRC.  Step 3: The CRC derived in step 2 replaces the appended 0’s at the end of the data unit.
  • 11. HOW IT WORKS???  At the receiver:  The data unit arrives at the receiver data first followed by the CRC.  Step 1: The receiver treats the whole string as a unit and divides it by the same divisor that was used to find the CRC remainder.  Result:  If the string arrives without error ,the CRC checker yields a remainder of 0 and the data unit passes.  If the string has been changed in transit ,the division yields a non zero remainder and the string passes.
  • 12. THE CRC DIVISOR  The divisor in the CRC generator is most often represented not as a string of 1’s and 0’s but as an algebraic polynomial.  A polynomial should be selected to have at least the following properties:  It should not be divisible by x.  It should be divisible by x+1.  E.g.
  • 14. STANDARD POLYNOMIALS Name Polynomial Application CRC-8CRC-8 x8 + x2 + x + 1 ATM header CRC-10CRC-10 x10 + x9 + x5 + x4 + x2 + 1 ATM AAL ITU-16ITU-16 x16 + x12 + x5 + 1 HDLC ITU-32ITU-32 x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 LANs
  • 15. PERFORMANCE OF CRC  CRC can detect all burst errors that effect an odd number of bits.  CRC can detect all burst errors of length less than or equal to the degree of polynomial.  CRC can detect with a very high probability ,burst errors of length greater than the degree of polynomial.
  • 16. CHECKSUM  The checksum is also based on the concept of redundancy.
  • 17. CHECKSUM GENERATOR  The sender follows these steps:  Step 1: The unit is divided in to k sections, each of n bits.  Step 2: All sections are added using one’s complement to get the sum in such a way that the total is also n bits long.  Step 3: The sum is then complemented and becomes the checksum.  Step 4: The checksum is sent with the data.
  • 18. CHECKSUM CHECKER  The sender follows these steps:  Step 1: The unit is divided in to k sections, each of n bits.  Step 2: All sections are added using one’s complement to get the sum in such a way that the total is also n bits long.   Step 3: The sum is then complemented.  Step 4: If the result is zero, the data are accepted, otherwise they are rejected.
  • 20. DATA UNIT AND CHECKSUM
  • 21. Example 1Example 1 Suppose the following block of 16 bits is to be sent using a checksum of 8 bits. 10101001 00111001 The numbers are added using one’s complement 10101001 00111001 ------------ Sum 11100010 Checksum 00011101 The pattern sent is 10101001 00111001 00011101
  • 22. EXAMPLE 1 CONTINUED… Now suppose the receiver receives the pattern sent and there is no error. 10101001 00111001 00011101 When the receiver adds the three sections, it will get all 1s, which, after complementing, is all 0s and shows that there is no error. 10101001 00111001 00011101 Sum 11111111 Complement 00000000 means that the pattern is OK.
  • 23. EXAMPLE 1 CONTINUED… Now suppose there is a burst error of length 5 that affects 4 bits. 10101111 11111001 00011101 When the receiver adds the three sections, it gets 10101111 11111001 00011101 Partial Sum 1 11000101 Carry 1 Sum 11000110 Complement 00111001 the pattern is corrupted.
  • 24. PERFORMANCE OF CHECKSUM  The checksum detects all errors involving an odd number of bits as well as most errors involving an even number of bits.  However if one or more bits of a segment are damaged and the corresponding bit or bits of opposite value in a second segment are also damaged,the sums of those columns will not change and the receiver will not detect a problem.  Checksum retains all carriers, so although two 0s becoming 1 would not alter the value of their own column,it would change the value of the next higher column.