The Wayback Machine - https://web.archive.org/web/20241007035651/https://www.geeksforgeeks.org/error-detection-in-computer-networks/
Open In App

Error Detection in Computer Networks

Last Updated : 12 Jul, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Error is a condition when the receiver’s information does not match the sender’s. Digital signals suffer from noise during transmission that can introduce errors in the binary bits traveling from sender to receiver. That means a 0 bit may change to 1 or a 1 bit may change to 0. 

Data (Implemented either at the Data link layer or Transport Layer of the OSI Model) may get scrambled by noise or get corrupted whenever a message is transmitted. To prevent such errors, error-detection codes are added as extra data to digital messages. This helps in detecting any errors that may have occurred during message transmission.

Types of Errors

Single-Bit Error

A single-bit error refers to a type of data transmission error that occurs when one bit (i.e., a single binary digit) of a transmitted data unit is altered during transmission, resulting in an incorrect or corrupted data unit.

single bit error

Single-Bit Error

Multiple-Bit Error

A multiple-bit error is an error type that arises when more than one bit in a data transmission is affected. Although multiple-bit errors are relatively rare when compared to single-bit errors, they can still occur, particularly in high-noise or high-interference digital environments.

Multiple bit error

Multiple-Bit Error

Burst Error

When several consecutive bits are flipped mistakenly in digital transmission, it creates a burst error. This error causes a sequence of consecutive incorrect values.

Burst error

Burst Error

Error Detection Methods

To detect errors, a common technique is to introduce redundancy bits that provide additional information. Various techniques for error detection include:

  • Simple Parity Check
  • Two-Dimensional Parity Check
  • Checksum
  • Cyclic Redundancy Check (CRC)

Simple Parity Check

Simple-bit parity is a simple error detection method that involves adding an extra bit to a data transmission. It works as:

  • 1 is added to the block if it contains an odd number of 1’s, and
  • 0 is added if it contains an even number of 1’s

This scheme makes the total number of 1’s even, that is why it is called even parity checking. 

Even parity check

Advantages of Simple Parity Check

  • Simple parity check can detect all single bit error.
  • Simple parity check can detect an odd number of errors.
  • Implementation: Simple Parity Check is easy to implement in both hardware and software.
  • Minimal Extra Data: Only one additional bit (the parity bit) is added per data unit (e.g., per byte).
  • Fast Error Detection: The process of calculating and checking the parity bit is quick, which allows for rapid error detection without significant delay in data processing or communication.
  • Single-Bit Error Detection: It can effectively detect single-bit errors within a data unit, providing a basic level of error detection for relatively low-error environments.

Disadvantages of Simple Parity Check

  • Single Parity check is not able to detect even no. of bit error. 
  • For example, the Data to be transmitted is 101010. Codeword transmitted to the receiver is 1010101 (we have used even parity). 
    Let’s assume that during transmission, two of the bits of code word flipped to 1111101.
    On receiving the code word, the receiver finds the no. of ones to be even and hence no error, which is a wrong assumption.

Two-Dimensional Parity Check

Two-dimensional Parity check bits are calculated for each row, which is equivalent to a simple parity check bit. Parity check bits are also calculated for all columns, then both are sent along with the data. At the receiving end, these are compared with the parity bits calculated on the received data.

 2-D parity check

Advantages of Two-Dimensional Parity Check

  • Two-Dimensional Parity Check can detect and correct all single bit error.
  • Two-Dimensional Parity Check can detect two or three bit error that occur any where in the matrix.

Disadvantages of Two-Dimensional Parity Check

  • Two-Dimensional Parity Check can not correct two or three bit error. It can only detect two or three bit error.
  • If we have a error in the parity bit then this scheme will not work.

Checksum

Checksum error detection is a method used to identify errors in transmitted data. The process involves dividing the data into equally sized segments and using a 1’s complement to calculate the sum of these segments. The calculated sum is then sent along with the data to the receiver. At the receiver’s end, the same process is repeated and if all zeroes are obtained in the sum, it means that the data is correct.

Checksum – Operation at Sender’s Side

  • Firstly, the data is divided into k segments each of m bits.
  • On the sender’s end, the segments are added using 1’s complement arithmetic to get the sum. The sum is complemented to get the checksum.
  • The checksum segment is sent along with the data segments.

Checksum – Operation at Receiver’s Side

  • At the receiver’s end, all received segments are added using 1’s complement arithmetic to get the sum. The sum is complemented.
  • If the result is zero, the received data is accepted; otherwise discarded.

Checksum

Cyclic Redundancy Check (CRC)

  • Unlike the checksum scheme, which is based on addition, CRC is based on binary division.
  • In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appended to the end of the data unit so that the resulting data unit becomes exactly divisible by a second, predetermined binary number.
  • At the destination, the incoming data unit is divided by the same number. If at this step there is no remainder, the data unit is assumed to be correct and is therefore accepted.
  • A remainder indicates that the data unit has been damaged in transit and therefore must be rejected.

CRCCRC Working

We have given dataword of length n and divisor of length k.

Step 1: Append (k-1) zero’s to the original message

Step 2: Perform modulo 2 division

Step 3: Remainder of division = CRC

Step 4: Code word = Data with append k-1 zero’s + CRC

Note:

  • CRC must be k-1 bits
  • Length of Code word = n+k-1 bits

Example: Let’s data to be send is 1010000 and divisor in the form of polynomial is x3+1. CRC method discussed below.

CRC-Example

Example: Previous year GATE questions based on error detection: GATE CS 2009 Question 48 GATE CS 2007 Question 68.

Advantages of Error Detection

  • Increased Data Reliability: Error detection ensures that the data transmitted over the network is reliable, accurate, and free from errors. This ensures that the recipient receives the same data that was transmitted by the sender.
  • Improved Network Performance: Error detection mechanisms can help to identify and isolate network issues that are causing errors. This can help to improve the overall performance of the network and reduce downtime.
  • Enhanced Data Security: Error detection can also help to ensure that the data transmitted over the network is secure and has not been tampered with.

Disadvantages of Error Detection

  • Overhead: Error detection requires additional resources and processing power, which can lead to increased overhead on the network. This can result in slower network performance and increased latency.
  • False Positives: Error detection mechanisms can sometimes generate false positives, which can result in unnecessary retransmission of data. This can further increase the overhead on the network.
  • Limited Error Correction: Error detection can only identify errors but cannot correct them. This means that the recipient must rely on the sender to retransmit the data, which can lead to further delays and increased network overhead.

Conclusion

In conclusion, error detection in computer networks is crucial for ensuring data is transmitted accurately and reliably. By using various techniques, like checksums, parity bits, and cyclic redundancy checks, networks can identify and correct errors that occur during data transmission. These methods help maintain the integrity of the data, prevent communication problems, and ensure that information is delivered correctly from one device to another. This reliability is essential for the smooth operation of all digital communications and applications that rely on network connectivity.

Frequently Asked Questions on Error Detection – FAQs

How many types of error detection are there?

There are several types of error detection methods commonly used in computer networks. Some common error detection methods are:

  • Simple Parity Check
  • Two-Dimensional Parity Check
  • Checksum
  • Cyclic Redundancy Check (CRC)

Which is the best method of error detection?

Cyclic Redundancy Check (CRC) is often considered one of the best and most widely used methods due to its high effectiveness and efficiency.

How many types of computer errors are there?

There are three types of error in transferring the data. These are:

  • Single bit error
  • Multiple bit error
  • Burst error


Previous Article
Next Article

Similar Reads

Forward Error Correction in Computer Networks
Forward Error Correction (FEC) is a technique used to minimize errors in data transmission over communication channels. In real-time multimedia transmission, re-transmission of corrupted and lost packets is not useful because it creates an unacceptable delay in reproducing : one needs to wait until the lost or corrupted packet is resent. Thus, ther
3 min read
Error Correction in Computer Networks
This article covers in-depth details about Errors in Networking, their types, and methods of Error Correction. By the end of this, you will gain a clear understanding of Error Correction in Computer Networking. So, let us dive deep into Error Correction in Networking. Table of Content Introduction Table of ContentsWhat are Errors in Networking?Type
10 min read
Which Layer Called Error Detection Layer?
Answer: The Data Link layer is often referred to as the error detection layer.And, Transport Layer is also responsible for error detection and recovery in data communication. Error DetectionThe Data Link layer is responsible for transferring data frames between adjacent network nodes. During this process, it employs error detection techniques to en
1 min read
Error Detection Code - Checksum
Checksum is the error detection method used by upper layer protocols and is considered to be more reliable than LRC, VRC and CRC. This method makes the use of Checksum Generator on Sender side and Checksum Checker on Receiver side. At the Sender side, the data is divided into equal subunits of n bit length by the checksum generator. This bit is gen
2 min read
Computer Networks | Set 5
Following questions have been asked in GATE CS 2005 exam. 1) Packets of the same session may be routed through different paths in: (a) TCP, but not UDP (b) TCP and UDP (c) UDP, but not TCP (d) Neither TCP nor UDP Answer (b) Packet is the Network layer Protocol Data Unit (PDU). TCP and UDP are Transport layer protocols. Packets of same session may b
2 min read
Computer Networks | Set 3
Following Questions have been asked in GATE 2011 CS exam. 1) A layer-4 firewall ( a device that can look at all protocol headers up to the transport layer) CANNOT (A) block HTTP traffic during 9:00PM and 5:00AM (B) block all ICMP traffic (C) stop incoming traffic from a specific IP address but allow outgoing traffic to same IP (D) block TCP traffic
3 min read
Computer Networks | Set 12
Following questions have been asked in GATE CS 2009 exam. 1) Let G(x) be the generator polynomial used for CRC checking. What is the condition that should be satisfied by G(x) to detect odd number of bits in error? (A) G(x) contains more than two terms (B) G(x) does not divide 1+x^k, for any k not exceeding the frame length (C) 1+x is a factor of G
2 min read
Computer Networks | Set 6
Following questions have been asked in GATE CS 2005 exam. 1) An organization has a class B network and wishes to form subnets for 64 departments. The subnet mask would be: (a) 255.255.0.0 (b) 255.255.64.0 (c) 255.255.128.0 (d) 255.255.252.0 Answer (d) The size of network ID is 16 bit in class B networks. So bits after 16th bit must be used to creat
4 min read
Computer Networks | Set 7
Following questions have been asked in GATE CS 2008 exam. 1) Which of the following system calls results in the sending of SYN packets? (A) socket (B) bind (C) listen (D) connect Answer (D) socket() creates a new socket of a certain socket type, identified by an integer number, and allocates system resources to it. bind() is typically used on the s
3 min read
Computer Networks | Set 8
Following questions have been asked in GATE CS 2008 exam. 1) What is the maximum size of data that the application layer can pass on to the TCP layer below? (A) Any size (B) 2^16 bytes-size of TCP header (C) 2^16 bytes (D) 1500 bytes Answer (A) Application layer can send any size of data. There is no limit defined by standards. The lower layers div
2 min read
Computer Networks | Set 9
Following questions have been asked in GATE CS 2007 exam. 1) Which one of the following uses UDP as the transport protocol? (A) HTTP (B) Telnet (C) DNS (D) SMTP Answer (C) DNS primarily uses User Datagram Protocol (UDP) on port number 53 to serve requests. DNS queries consist of a single UDP request from the client followed by a single UDP reply fr
2 min read
Computer Networks | Set 10
Following questions have been asked in GATE CS 2007 exam. 1) The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet? (A) 62 subnets and 262142 hosts. (B) 64 subnets and 262142 hosts. (C) 62 subnets and 1022 hosts. (D) 64 subnets and 1
4 min read
Computer Networks | Set 11
Following questions have been asked in GATE CS 2006 exam. 1) Station A uses 32 byte packets to transmit messages to Station B using a sliding window protocol. The round trip delay between A and B is 80 milliseconds and the bottleneck bandwidth on the path between A and B is 128 kbps. What is the optimal window size that A should use? (A) 20 (B) 40
3 min read
Computer Networks | IP Addressing | Question 5
If subnet mask 255.255.255.224, which of the following will be Direct Broadcast address ? (A) 202.15.19.127 (B) 202.15.19.63 (C) Both a and b (D) None of the Above Answer: (C) Explanation: Subnet mask is   255.255.255.11100000 In DBA all host bits are 1. from option 202.15.19.011 11111 , this can be a DBA. 202.15.19.001 11111 ,this can also be a DB
1 min read
Computer Networks | IP Addressing | Question 6
Which of the following is public IP address ? (A) 10.15.14.12 (B) 192.168.52.62 (C) 172.32.1.1 (D) None of the Above Answer: (C) Explanation: Range of Private IP 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255 Option C doesn't belong to this rangeQuiz of this Question
1 min read
End to End Encryption (E2EE) in Computer Networks
What is Encryption? Have you ever wondered how our emails, texts, photos, videos are sent over the Internet? Whenever you send anything over the Internet, it passes through a lot of servers, routers, and other devices where anyone can intercept it and get access to your private information. Thus, to tackle such mishap, encryption was introduced. In
2 min read
Introduction of Botnet in Computer Networks
A Network of compromised computers is called a botnet. Compromised computers are also called Zombies or Bots. This software is mostly written in C++ & C. The main motive of botnet is that it starts with the dark side of the internet which introduced a new kind of Crime called Cybercrime. Among the malware (malicious software) botnet is the most
5 min read
Access Control Tactics in Computer Networks
Discretionary Access Control: Discretionary Access Control grants or restricts object access determined by the object’s owner. Controls are discretionary because an object owner with certain access permissions can pass on those permissions to another subject. In systems that utilize discretionary access controls, the owner of an object can choose w
2 min read
List of "Difference Between" Computer Networks Topics
Computer Network is a set of devices or systems that shares resources through links and it can be defined as a collection of nodes. A node can be any device capable of transferring or receiving data. The communicating nodes need to be connected by communication links. A computer network refers to interconnected computing devices that can interchang
4 min read
What is Traffic Throttling in Computer Networks?
A network is made by connecting various devices either through ethernet or by connecting them wirelessly. When the performance of the network reduces due to the availability of so many packets in the subnet it is known as congestion. If the size of the router is small it leads to congestion and even if the size is large it takes more time for the p
4 min read
What is Load Shedding in Computer Networks?
A network consists of various devices or resources. Each resource is assigned to perform a particular task. Sometimes the available resources are more but the task or load to be performed is less whereas sometimes it is completely opposite. In such scenarios when the load is more as compared to the available resources in the network it is known as
4 min read
Microwaves in Computer Networks
Data transfer speed and reliability are two main contexts of the realm of computer networks. In the modern days, microwave connectivity medium has gained popularity for its blazing fast data transmission capability and reliability. Microwaves are nothing but a special type of electromagnetic spectrum. Microwaves are used in various computer applica
4 min read
Line Configuration in Computer Networks
A network is two or more devices connected through a link. A link is a communication pathway that transfers data from one device to another. Devices can be a computer, printer, or any other device that is capable to send and receive data. For visualization purposes, imagine any link as a line drawn between two points. For communication to occur, tw
9 min read
Payload in Computer Networks
Payload During the transmission of the data with the Internet Protocol from the sender to receiver. Data is sent in terms of packets and individual packets contain a header and the data which is sent by the sender this data is called Payload. Headers are appended to the payload for transport and then discarded when they successfully reach their des
2 min read
Piggybacking in Computer Networks
Pre-Requisite: Transmission Mode in Computer Networks Piggybacking is the technique of delaying outgoing acknowledgment and attaching it to the next data packet.  When a data frame arrives, the receiver waits and does not send the control frame (acknowledgment) back immediately. The receiver waits until its network layer moves to the next data pack
5 min read
Satellite Switched TDMA in Computer Networks
Satellite Switched TDMA is a method used in satellite communication to efficiently allocate transmission time slots to different users. In this method the satellite acts like a traffic controller, giving each station a specific time interval to send and receive data. This process prevents interference and ensures that multiple stations can use the
4 min read
Computer Networks | Set 4
Following Questions have been asked in GATE 2010 CS exam. 1) One of the header fields in an IP datagram is the Time to Live (TTL) field. Which of the following statements best explains the need for this field? (A) It can be used to prioritize packets (B) It can be used to reduce delays (C) It can be used to optimize throughput (D) It can be used to
4 min read
Basic Characteristics of Computer Networks
Computer networks allow multiple devices to connect and share resources like files, printers, and internet access. Key characteristics include the network's size (like local or wide area), the way data is transferred (wired or wireless), and the network's layout (such as star or mesh). These features help determine how well the network performs and
5 min read
Commonly asked Computer Networks Interview Questions | Set 1
What are Unicasting, Anycasting, Multicasting and Broadcasting? If the message is sent from a source to a single destination node, it is called Unicasting. This is typically done in networks. If the message is sent from a source to any of the given destination nodes. This is used a lot in Content delivery Systems where we want to get content from a
4 min read
Congestion Control in Computer Networks
Congestion control is a crucial concept in computer networks. It refers to the methods used to prevent network overload and ensure smooth data flow. When too much data is sent through the network at once, it can cause delays and data loss. Congestion control techniques help manage the traffic, so all users can enjoy a stable and efficient network c
8 min read