Computer Communication Networks CS-418: Lecture 2 - 2 Data Link Layer - Error Detection Techniques
Computer Communication Networks CS-418: Lecture 2 - 2 Data Link Layer - Error Detection Techniques
CS-418
Lecture 2 – 2
Data Link Layer – Error Detection
Techniques
Spring Semester 2021 1
Synchronization
• Data are transmitted one character at a time , where each character is 5 – 8 bits in length.
• Timing or synchronization is maintained within each character.
• When no character is being transmitted, the line between transmitter and receiver is in an
idle state. The definition of idle is equivalent to the signaling element for binary 1.
• The beginning of a character is signaled by a start bit with a value of binary 0.
• This is followed by the 5 to 8 bits that actually make up the character. The bits of the
character are transmitted beginning with the least significant bit.
• The parity bit is set by the transmitter such that the total number of ones in the character,
including the parity bit, is even (even parity) or odd (odd parity), depending on the
convention being used. The receiver uses this bit for error detection.
• The final element is a stop element, which is a binary 1.
• A minimum length for the stop element is specified, and this is usually 1, 1.5, or 2 times the
duration of an ordinary bit.
• Because the stop element is the same as the idle state, the transmitter will continue to
transmit the stop element until it is ready to send the next character.
• The frame starts with a preamble called a flag, which is 8 bits long.
The same flag is used as a postamble.
• The receiver looks for the occurrence of the flag pattern to signal the
start of a frame.
• This is followed by some number of control fields (containing data
link control protocol information), then a data field (variable length
for most protocols), more control fields, and finally the flag is
repeated.
• Synchronous transmission is far more efficient than asynchronous.
Spring Semester 2021 9
Types of Errors
• In digital transmission systems, an error occurs when a bit is
altered between transmission and reception; that is, a binary 1
is transmitted and a binary 0 is received, or a binary 0 is
transmitted and a binary 1 is received.
• Two general types of errors can occur:
• Single bit errors - A single bit error is an isolated error condition that
alters one bit but does not affect nearby bits.
• Burst errors - A burst error of length B is a contiguous sequence of B
bits in which the first and last bits and any number of intermediate bits
are received in error.
00000010 00001010
Sent Single Bit Error Received
Sent 0100010001000011
Corrupted Bits
Received 0101110101100011
Burst Error
Spring Semester 2021 11
Types of Errors
• Single bit errors are the least likely type of error in serial data
transmission.
• A burst error 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.
• A burst error is more likely to occur than a single bit error. The duration of
noise is normally longer than the duration of 1 bit, which means that
when noise affects data, it affects a set of bits.
• The number of bits affected depends on the data rate and duration of
noise.
• Example: when a wireless transmitter transmits at 11 Mbps and an
interference burst of 200 μs occurs, 2200 bits are affected by the burst.
0111000110101011 1
‘d +1’ bits
Transmitted Frame
11001111 1011101 1 0111001 0 01010011 0101010 1
1100111 1
1111101 1 Parity Error
0111001 0 *Bit in position (2,2) is switched to 1
0101001 1 *A single error in the parity bits is also
0101010 1 detectable and correctable.
Parity Error
1100111 1
*Bit in position (2,2) is switched to 1 and bit
1111001 1 in position (2,5)is switched to 0
0111001 0
*Two-dimensional parity can also detect
0101001 1 (but not correct!) any combination of two
1 errors in a packet.
0101010
Parity Error Parity Error
Sender Side:
10101001
Checksum
Binary addition 00111001
1’s complement
11100010 00011101
Receiver Side:
10101001
00111001 Result is zero so the data is
00011101 intact and no error
1’s complement
11111111 00000000
Receiver Side:
00101001
00111001 Result is non zero so the data
00011101 has error and it is discarded
1’s complement
01111111 10000000
‘d+r’ bits
‘15’ bits
‘15’ bits
1010001101 01110
‘15’ bits
𝑇
𝐺
Because there is no
remainder, it is
assumed that there
have been no errors.