/
Subject Name : COMPUTER Subject Name : COMPUTER

Subject Name : COMPUTER - PowerPoint Presentation

grace3
grace3 . @grace3
Follow
66 views
Uploaded On 2023-05-22

Subject Name : COMPUTER - PPT Presentation

NETWORKS1 Subject Code 10CS55 Prepared By Shruthi N Krishna Sowjanyak S anthiyaM Department CSE 2 Data Link Layer1Error Detection and correction ID: 999002

bits code bit errors code bits errors bit error data checksum hamming parity check block codes number single burst

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Subject Name : COMPUTER" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1. Subject Name: COMPUTER NETWORKS-1 Subject Code:10CS55 Prepared By: Shruthi N, Krishna Sowjanya.k, Santhiya.M Department: CSE

2. 2Data Link Layer-1:Error Detection and correction

3. Networks must be able to transfer data from one device to another with complete accuracy. Data can be corrupted during transmission. For reliable communication, errors must be detected and corrected. Error detection and correction are implemented either at the data link layer or the transport layer of the OSI model.

4. Types of Errors

5. Single bit errors Single bit errors are the least likely type of errors in serial data transmission because the noise must have a very short duration which is very rare. However this kind of errors can happen in parallel transmission.Example:If data is sent at 1Mbps then each bit lasts only 1/1,000,000 sec. or 1 μs.For a single-bit error to occur, the noise must have a duration of only 1 μs, which is very rare.

6. Single-bit error

7. Burst error The term burst error means that two or more bits in the data unit have changed from 1 to 0 or from 0 to 1. Burst errors does not necessarily mean that the errors occur in consecutive bits, the length of the burst is measured from the first corrupted bit to the last corrupted bit. Some bits in between may not have been corrupted.

8. Burst errorBurst error is most likely to happen in serial transmission since the duration of noise is normally longer than the duration of a bit.The number of bits affected depends on the data rate and duration of noise.Example:If data is sent at rate = 1Kbps then a noise of 1/100 sec can affect 10 bits.(1/100*1000)If same data is sent at rate = 1Mbps then a noise of 1/100 sec can affect 10,000 bits.(1/100*106)

9. Burst error

10. 10RedundancyTo detect or correct errors, redundant bits of data must be added

11. 11CodingProcess of adding redundancy for error detection or correctionTwo types:Block codesDivides the data to be sent into a set of blocksExtra information attached to each blockMemorylessConvolutional codesTreats data as a series of bits, and computes a code over a continuous seriesThe code computed for a set of bits depends on the current and previous input

12. 12Block CodingMessage is divided into k-bit blocksKnown as datawordsr redundant bits are addedBlocks become n=k+r bitsKnown as codewords

13. 13Error Detection in Block CodingAn error-detecting code can detect only the types of errors for which it is designedOther types of errors may remain undetected.There is no way to detect every possible error

14. 1414Error Correction

15. 15Hamming Distanced(01, 00) = ?d(11, 00) = ?d(010, 100) = ?d(0011, 1000) = ?How many 8-bit words are n bits away from 10000111?Hamming Distance between two words is the number of differences between corresponding bits.

16. 16Minimum Hamming DistanceFind the minimum Hamming Distance of the following codebookThe minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words.00000010111010111110

17. Engineered for Tomorrow17Detection Capability of CodeTo guarantee the detection of up to s-bit errors, the minimum Hamming distance in a block code must bedmin = s + 1

18. 18Correction Capability of CodeTo guarantee the correction of up to t-bit errors, the minimum Hamming distance in a block code must bedmin = 2t + 1

19. Linear Block CodesAlmost all block codes used today belong to a subset called linear block codes. A linear block code is a code in which the exclusive OR (addition modulo-2) of two valid codewords creates another valid codewordA simple parity-check code is a single-bit error-detecting code in which n = k + 1 with dmin = 2.Even parity (ensures that a codeword has an even number of 1’s) and odd parity (ensures that there are an odd number of 1’s in the codeword)A simple parity-check code can detect an odd number of errors.

20. 10. Simple parity-check code C(5, 4)

21. Encoder and decoder for simple parity-check code

22. Two Dimensional parity checkThe dataword is organized in a table (rows and columns)For each row and each column, 1 parity-check bit is calculated. The whole table is then sent to the receiver, which finds the syndrome for each row and each column.The two-dimensional parity check can detect up to three errors that occur anywhere in the table (arrows point to the locations of the created nonzero syndromes).However, errors affecting 4 bits may not be detected

23. Two-dimensional parity-check code

24. Two-dimensional parity-check code

25. Two-dimensional parity-check code

26. Hamming codesThese codes were originally designed with dmin = 3, which means that they can detect up to two errors or correct one single error. Although there are some Hamming codes that can correct more than one error, our discussion focuses on the single-bit error-correcting code.A codeword consists of n bits of which k are data bits and r are check bits. Let m = r, then we have: n = 2m -1and k = n-m

27. For example if m=3,then n=7 and k-=4.This is hamming code C(7,4) with dmin=3.The data word and codeword for this code is shown.

28. The structure of the encoder and decoder for a Hamming code

29. 10.Figure 10.13 Burst error correction using Hamming code

30. Cyclic codesCyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword is cyclically shifted (rotated), the result is another codewordWe can create cyclic codes to correct errors.A category of cyclic codes is the cyclic redundancy check(CRC) which is used in LANs and WANs

31. 10.31 CRC encoder and decoder

32. 10.32 Division in CRC encoder (Encoder)

33. 10.33Division in the CRC decoder for two cases (Decoder)

34. 34Polynomial RepresentationMore common representation than binary formEasy to analyzeDivisor is commonly called generator polynomial

35. CRC division using polynomials

36. 36Strength of CRCCan be analyzed using polynomialM(x) – Original messageG(x) – Generator polynomial of degree nR(x) – Generated CRCTransmitted message is M(x)xn – R(x) which is divisible by G(x)M(x)xn = Q(x)G(x) + R(x)

37. 37Strength of CRCReceived message isM(x)xn – R(x) + E(x) where E(x) represents bit errorsReceiver does not detect any error when E(x) is divisible by G(x), which means either:E(x) 0  No errorE(x)  0  Undetectable error

38. 38Strength of CRCIf G(x) contains at least two terms, then all single-bit errors can be detectedIf G(x) cannot divide xt + 1 (0 t < n), then all isolated double errors can be detectedIf G(x) contains a factor of (x+1), all odd-numbered errors can be detected

39. 39Properties of Good PolynomialIt should have at least two termsThe coefficient of the term x0 should be 1It should not divide xt + 1, for t between 2 and n − 1It should have the factor x + 1

40. 40Standard Polynomials

41. ChecksumThe checksum is used in the Internet by several protocols although not at the data link layer.Like linear and cyclic codes, the checksum is based on the concept of redundancy. Several protocols still use the checksum for error detection although the tendency is to replace it with a CRC. This means that the CRC is also used in layers other than the data link layer.The concept of the checksum is not difficult.

42. One’s complimentIn this arithmetic, we can represent unsigned numbers between 0 and 2n - 1 using only n bits. If the number has more than n bits, the extra leftmost bits need to be added to the n rightmost bits (wrapping). In one's complement arithmetic, a negative number can be represented by inverting all bits (changing a 0 to a 1 and a 1 to a 0). This is the same as subtracting the number from 2n - 1.

43. Internet ChecksumTraditionally, the Internet has been using a 16-bit checksum. The sender calculates the checksum by following these steps. The message is divided into 16-bit words. The value of the checksum word is set to O. All words including the checksum are added ushtg one's complement addition. The sum is complemented and becomes the checksum. The checksum is sent with the data. The receiver uses the following steps for error correction The message (including checksum) is divided into 16-bit words. All words are added using one's complement addition.The sum is complemented and becomes the new checksum. If the value of checksum is 0, the message is accepted; otherwise, it is rejected.