S8 - Error Detection
S8 - Error Detection
[22EC2210]
CO-1
Error Detection
AIM OF THE SESSION
The aim of the module on Error Detection in Computer Networks is to provide students with a comprehensive
understanding of error detection techniques and protocols used in computer networks. The module aims to equip
students with the knowledge and skills necessary to detect and handle errors that occur during data transmission,
ensuring data integrity and reliability in network communication.
2
AGENDA
Errors
Types of Errors
Error Detection
Block Coding
Parity Check
Checksum
3
Error Detection
• Data can be corrupted during transmission. For reliable communication, error 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
TYPE OF ERRORS
TYPE OF ERRORS(CONT’D)
• Single-Bit Error
is when only one bit in the data unit has changed (ex : ASCII STX - ASCII LF)
TYPE OF ERRORS(CONT’D)
• Multiple-Bit Error
is when two or more
nonconsecutive bits in the data unit have
changed(ex : ASCII B - ASCII LF)
TYPE OF ERRORS(CONT’D)
• Burst Error
means that 2 or more consecutive bits in the data unit have changed
DETECTION
• Error detection uses the concept of redundancy, which means adding extra bits for
detecting errors at the destination
THE STRUCTURE OF ENCODER AND DECODER
9
BLOCK CODING
• In block coding, we divide our message into blocks, each of k bits, called datawords. We
add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks
are called codewords.
10
DETECTION(CONT’D)
• Detection methods
DETECTION(CONT’D)
• Parity Check
• A parity bit is added to every data unit so that the total number of 1s(including the parity bit)
becomes even for even-parity check or odd for odd-parity check
• Simple parity check
DETECTION -EXAMPLES
Example 1
Suppose the sender wants to send the word world.
In ASCII the five characters are coded as
1110111 1101111 1110010 1101100 1100100
The following shows the actual bits sent
Example 2
Now suppose the word world in Example 1 is received by the receiver without being corrupted in
transmission.
11101110 11011110 11100100 11011000 11001001
The receiver counts the 1s in each character and comes up with even numbers (6, 6, 4, 4, 4). The
data are accepted.
DETECTION -EXAMPLES
Example 3
Now suppose the word world in Example 1 is corrupted during transmission.
11111110 11011110 11101100 11011000 11001001
The receiver counts the 1s in each character and comes up with even and odd numbers
(7, 6, 5, 4, 4). The receiver knows that the data are corrupted, discards them, and asks
for retransmission.
TWO –DIMENSIONAL PARITY CHECK
TWO-DIMENSIONAL PARITY-CHECK CODE
17
TWO-DIMENSIONAL PARITY-CHECK CODE
18
CYCLIC REDUNDANCY CHECK (CRC):
19
Example-1: Consider the message M=1001 and do the Cyclic Redundancy check for the above
message using the following divisor 1011. Also check for errors on the received data using CRC.
Sol: Given Dividend = 1001 ( k = 4) and Divisor = 1011 (n-k+1)
given n – k + 1 = 4 , first we need to find n and then calculate redundant bits
n–k+1=4
n–4+1=4
n=7
if n = 7 then no of redundant bits = n – k = 7 – 4 = 3
so we need to add three 0’s to the data word
20
21
DETECTION(CONT’D)
• Polynomials
• CRC generator(divisor) is most often represented not as a string of 1s and 0s, but as an algebraic
polynomial.
DETECTION(CONT’D)
24
25
DETECTION(CONT’D)
Checksum
Like the parity checks and CRC, the checksum is based on the concept of redundancy.
Checksum Generator
Checksum Generator subdivides the data unit into equal segments of n bits.
The segments are added using ones complement arithmetic in such a way that the total is also n
bits long.
The total is then complemented and appended to the end of the original data unit as redundant
bits, called checksum field.
The extended data unit is transmitted across the network.
If the sum of the data segment is T, the checksum will be -T
DETECTION(CONT’D)
Checksum Checker
• Example ( at a sender)
• Example ( at a receiver)
2. Explain the concept of parity checking and how it can be used for error detection.
3. What are checksums, and how are they calculated and verified for error detection?
4. Describe the principles of the cyclic redundancy check (CRC) algorithm and its role in error detection.
5. Compare and contrast the strengths and limitations of parity checking, checksums, and CRC for error
detection.
6. How does Automatic Repeat Request (ARQ) work in error detection and correction? Explain different
ARQ schemes.
7. How do errors in network communication impact network performance, and why is error detection
crucial for reliable data transmission?
30
REFERENCES FOR FURTHER LEARNING OF THE
SESSION
Reference Books:
CISCO Academy
NPTEL, Computer Networks and Internet Protocols, Prof. Soumya Kanti Ghosh, Prof. Sandip
Chakraborty IIT Kharagpur. (https://nptel.ac.in/courses/106105183)
31
THANK YOU