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

S8 - Error Detection

This document provides an overview of error detection techniques in computer networks. It discusses the importance of error detection for reliable network communication. The key types of errors that can occur during data transmission are described. Common error detection methods like parity checking, cyclic redundancy checks (CRC), and checksums are explained. These techniques operate by adding redundant bits to transmitted data to detect errors. The document also covers topics like block coding, polynomials, and examples to illustrate error detection algorithms. The objectives are to help students understand the concepts and apply error detection in practical scenarios.

Uploaded by

sripallavid1214
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

S8 - Error Detection

This document provides an overview of error detection techniques in computer networks. It discusses the importance of error detection for reliable network communication. The key types of errors that can occur during data transmission are described. Common error detection methods like parity checking, cyclic redundancy checks (CRC), and checksums are explained. These techniques operate by adding redundant bits to transmitted data to detect errors. The document also covers topics like block coding, polynomials, and examples to illustrate error detection algorithms. The objectives are to help students understand the concepts and apply error detection in practical scenarios.

Uploaded by

sripallavid1214
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Network Protocols & Security

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

INSTRUCTIONAL OBJECTIVES LEARNING OUTCOMES


 Understand the concept of error detection and its By the end of the module on Error Detection in Computer
importance in computer networks. Networks, students will be able to:
 Learn the principles and mechanisms of common  Understand the concept of error detection and its
significance in network communication.
error detection techniques, such as parity checking,
 Implement error detection techniques, such as parity
checksums, and cyclic redundancy check (CRC). checking, checksums, and CRC, to detect errors in
 Identify the limitations and strengths of different error data transmission.
detection techniques and protocols.  Evaluate the strengths and limitations of different
 Apply error detection techniques in practical error detection techniques and protocols.
scenarios, including data transmission over different  Analyze the impact of errors on network performance
network protocols. and propose appropriate error detection mechanisms
 Analyze the impact of errors on network performance based on specific network requirements.
and the importance of error detection in ensuring
reliable data communication.

2
AGENDA
 Errors

 Types of Errors

 Error Detection

 Block Coding

 Parity Check

 Cyclic Redundancy 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

To detect or correct errors, we need to send redundant bits

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

11101110 11011110 11100100 11011000 11001001


DETECTION -EXAMPLES

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

• We can create cyclic codes to correct errors.


• Suppose Data word is of length k and Code word is of n length, then n-k 0’s are to be added to the
dataword
• If data word is of k length and generator(n-k+1) has been given then first find n and then n-k 0’s are
to be added to the dataword (redundant bits)

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)

• A polynomial representing a divisor


Example-3: The message 1101011011 is to be transmitted using the generator polynomial x 4+ x +
1 to protect it from errors. Find the final data to be transmitted after performing CRC.

Example-4: M(x) = X3 + 1 and G(x) = X3 + x + 1


Sol: Given data word as M(x) = X3 + 1
To obtain code word, multiply M(x) by X3 (highest power of G(x))
so, C(x) = X3 (X3 + 1) = X6 + X3
Then divide C(x) with G(x) to obtain remainder

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

 The receiver subdivides the data unit


received into k sections, each of n bits
 All the sections are added using ones
complement to get the sum
 The sum is complemented
 If the result is zero, the data are accepted;
otherwise, they are rejected
DETECTION(CONT’D)

• Example ( at a sender)

Original data : 10101001 00111001


10101001
00111001
--------------
11100010 Sum
00011101 Checksum
10101001 00111001 00011101
DETECTION(CONT’D)

• Example ( at a receiver)

Received data : 10101001 00111001 00011101


10101001
00111001
00011101
---------------
11111111  Sum
00000000  Complement
Example-2: original data is 10110011 10101011 01011010 11010101. perform checksum to detect
error.
SELF-ASSESSMENT QUESTIONS
1. What is the purpose of error detection in computer networks, and why is it important?

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:

1. Data Communications and Networking, Behrouz A. Forouzan, 4 th Edition, McGraw Hill.


2. Computer Networks, Tanenbaum, 6th Edition, Pearson.

Sites and Web links:

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

Team – Networks Protocols & Security

You might also like