Presentation is loading. Please wait.

Presentation is loading. Please wait.

Error Detection.

Similar presentations


Presentation on theme: "Error Detection."— Presentation transcript:

1 Error Detection

2 Error Detection and Correction
Background Data can be corrupted during transmission For reliable communication, errors must be detected and corrected Error detection and correction can be implemented in Data link layer, or Transport layer

3 Types of Errors

4 Single-Bit Error Only one bit in the data units has changed Example
sent received

5 Burst Error Two or more bits in the data unit have changed
Errors do not occur in consecutive bits The length of the burst measured from the first corrupted bit to the last corrupted bit

6 Burst Error Example length of burst error 7 bits
sent received

7 Detection : Redundancy
1) Two copies of data unit (packet) are sent Receiving device compares them Able to detect errors Transmission time  double Computational time  slow

8 Detection : Redundancy
2) Only extra information is added Shorter group of bits may be added to each packet Used by the receiving device Discarded when it is used

9 Redundancy Check

10 Redundancy Check Four types of redundancy checks
Vertical redundancy check (VRC) Longitudinal redundancy check (LRC) Cyclical redundancy check (CRC) Checksum

11 Vertical Redundancy Check (VRC)
Implemented in the physical layer Most common and least expensive mechanism for error detection Also called parity bit check A redundant bit, called parity bit, is appended to every data unit The number of 1s for each data unit, including the parity bit, becomes even 0 is appended when the data unit consists of even 1s

12 VRC

13 VRC Original Data 1110111 1101111 1100100 Parity Bit added
Parity Bit added Received data Discard this data

14 VRC Performance Detects all single-bit errors (1, 3, 5, .. Bits changed) Able to detect burst errors if The total number of bits changed is odd Cannot detect errors where the total number of bits changed is even

15 Longitudinal Redundancy Check (LRC)
LRC  Original data + LRC

16 Cyclic Redundancy Check (CRC)
Based on Binary Division

17 CRC Generator Data plus extra zeros. The number of zeros is one less than the number or bits in the divisor. When the leftmost bit is zero, we must use 0000 instead of the original divisor

18 CRC Checker A CRC checker functions exactly like the generator
Data + CRC is divided by the predefined divisor If the remainder is all 0s, accept Otherwise discard the received data

19 Polynomial CRC generator (the divisor) is also represented as an algebraic polynomial It is short it can be used to prove the concept mathematically

20 Polynomial Polynomial properties : it should not be divisible by x it should be divisible by x+1 All burst errors of a length equal to the degree of polynomial are detected

21 Standard polynomial

22 Example of CRC Data = 1010001101 Polynomial = 110101
Calculate: = Remainder = 1110 Send data frame = Received Data = Polynomial = Calculate: = Remainder = 0

23 Checksum Used by the higher-layer protocols
Based on concept of redundancy Consists of checksum generator and checksum checker

24 Checksum Checksum generator
The data unit is divided into k sections, each of n bits All sections are added together using one’s complement to get the sum The sum is complemented and becomes the checksum The checksum is sent with the data

25 checksum Checksum checker
The data unit is divided into k sections, each of n bits All sections are added together using one’s complement to get the sum The sum is complemented If the result is zero, the data are accepted, otherwise, they are rejected

26 Checksum

27 Example : Checksum Generator
(sender) sum checksum  Data sent

28 Example : Checksum Checker
Received data sum all sections Sum Complement  OK

29 Error Correction Two methods Error-correction code
The sender retransmits the entire data The receiver corrects errors using error-correction code Error-correction code More sophisticated than error-detection codes Require more redundancy bits than error-detection

30 Error Correction (cont.)
Error-correction code (cont.) The number of bits required to correct multiple-bit or burst error is high In most case it is inefficient to do Most error correction is limited to one-, two-, or three-bit errors

31 Error Correction Self study if you are interested in it.


Download ppt "Error Detection."

Similar presentations


Ads by Google