0% found this document useful (0 votes)
8 views

7 - Data Link Layer

The document discusses error detection and correction in data communication networks. It describes how single-bit errors and burst errors can occur during data transmission. It then explains four main methods for detecting errors: vertical redundancy check (VRC), longitudinal redundancy check (LRC), checksum, and cyclic redundancy check (CRC). CRC is highlighted as the most advanced error detection method. The document also discusses error correction techniques, specifically single-bit error correction using Hamming codes which add redundant bits to enable detection and correction of single-bit errors.

Uploaded by

anshikac.it.21
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

7 - Data Link Layer

The document discusses error detection and correction in data communication networks. It describes how single-bit errors and burst errors can occur during data transmission. It then explains four main methods for detecting errors: vertical redundancy check (VRC), longitudinal redundancy check (LRC), checksum, and cyclic redundancy check (CRC). CRC is highlighted as the most advanced error detection method. The document also discusses error correction techniques, specifically single-bit error correction using Hamming codes which add redundant bits to enable detection and correction of single-bit errors.

Uploaded by

anshikac.it.21
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 31

Data Communication

and Networking (ITPC-205)

Data Link Layer


Error Detection and Correction
Error Detection and Correction

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.

Types of error: Single-bit error and burst Error

2
Single-bit error

In a single-bit error, only 1 bit in the data unit


has changed.

Figure: Single –bit error


3
Burst error

A burst error means that 2 or more bits in the data unit have
changed.

Figure: Burst error of length 8

4
Example:

 The number of bits affected depends on the data rate and


duration of noise.

 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)

5
Error detection

Error detection means to decide whether the received data


is correct or not without having a copy of the original
message.

Error detection uses the concept of redundancy, which


means adding extra bits for detecting errors at the
destination.

6
Redundancy

7
Detection methods

Four types of redundancy checks are used in data


communications

8
Vertical Redundancy Check (VRC)

It can detect single bit error


It can detect burst errors only if the total number of errors is odd.

9
Longitudinal Redundancy Check (LRC)

If two bits in one data units are damaged and two bits in
exactly the same positions in another data unit are also
damaged, the LRC checker will not detect an error.
Eg. Two data units are 11110000 and 11000011. If the first and
last bits in each of them is changed. The data units are
01110001 and 01000010 and error cant be detected.

10
LRC

11
VRC and LRC

12
Checksum

13
At the sender

The 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

14
At the receiver

The 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.

15
16
17
18
Cyclic Redundancy Check (CRC)

19
Cyclic Redundancy Check

Given a k-bit frame or message, the transmitter generates an n-


bit sequence, known as a frame check sequence (FCS), so that
the resulting frame, consisting of (k+n) bits, is exactly
divisible by some predetermined number.

The receiver then divides the incoming frame by the same


number and, if there is no remainder, assumes that there was
no error.

20
Binary Division

21
Binary Division

22
Error Correction

It can be handled in two ways:


• Receiver can have the sender retransmit the entire data
unit.
• The receiver can use an error-correcting code, which
automatically corrects certain errors.

Single-bit error correction


• To correct an error, the receiver reverses the value of
the altered bit. To do so, it must know which bit is in
error.

23
Hamming Distance

The hamming distance between two words is the number of differences


between corresponding bits

The hamming distance can easily be found if we apply XOR operation and
count the number of 1.

two pair of words are given d(0011, 0101)

Hamming distance is: 2

Bennett University 24
Hamming Code

Number of redundancy bits needed


Let data bits = m and redundancy bits = r
Total message sent = m+r
The value of r must satisfy the following relation:
2r ≥ m+r+1

25
Hamming Code

26
Hamming Code

27
Hamming Code

28
Example of Hamming Code

29
Single-bit error

30
Error Detection

31

You might also like