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

Error

Error detection techniques are used to detect errors that may occur during data transmission. Common error detection methods include parity checks, checksums, and cyclic redundancy checks (CRC). Hamming codes allow for both error detection and correction. They work by adding redundant bits to messages during encoding, which are then used at the receiving end to detect and correct single- and double-bit errors. Key types of errors include single-bit errors, multiple-bit errors, and burst errors where consecutive bits are corrupted. Error detection improves reliability and security, while error correction helps ensure accurate data delivery. However, these techniques also increase network overhead and processing requirements.

Uploaded by

Paridhi Gaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Error

Error detection techniques are used to detect errors that may occur during data transmission. Common error detection methods include parity checks, checksums, and cyclic redundancy checks (CRC). Hamming codes allow for both error detection and correction. They work by adding redundant bits to messages during encoding, which are then used at the receiving end to detect and correct single- and double-bit errors. Key types of errors include single-bit errors, multiple-bit errors, and burst errors where consecutive bits are corrupted. Error detection improves reliability and security, while error correction helps ensure accurate data delivery. However, these techniques also increase network overhead and processing requirements.

Uploaded by

Paridhi Gaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Error Detection in Computer Networks

Error is a condition when the receiver’s information does not match the sender’s information.
During transmission, digital signals suffer from noise 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

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

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

To detect errors, a common technique is to introduce redundancy bits that provide additional
information. Various techniques for error detection include::
1. Simple Parity Check
2. Two-dimensional Parity Check
3. Checksum
4. Cyclic Redundancy Check (CRC)

Error Detection Methods

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.

Disadvantages
 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.

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.
Disadvantages
 If one or more bits of a segment are damaged and the corresponding bit or bits of opposite
value in a second segment are also damaged.

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.
Advantages:
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:
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.

Hamming Code: Error Detection and Correction with Examples

What is an Error?
Transmitted data can be corrupted during communication. It is likely to be affected by external
noise or other physical failures. In such a situation, the input data can’t be the same as the output
data. This mismatch is known as “Error.”

The data errors may result in the loss of important or secure data. Most of the data transfer in
digital systems will be in the form of ‘Bit transfer.’ Even a small bit of change can affect the
performance of the entire system. In a data sequence, if 1 is changed to 0 or 0 is changed to 1, it
is called “Bit error.”

Table of Content:

Types of Errors
There are mainly three types of a bit error that occur in data transmission from the sender to the
receiver.

 Single bit errors


 Multiple bit errors
 Burst errors
Single Bit Errors
The change made in one bit in the entire data sequence is known as “Single bit error”. However,
the occurrence of single-bit error is not that common. Moreover, this error only occurs in a
parallel communication system because data is transferred bitwise in a single line. Therefore,
there is more chances that a single line can be noisy.

Multiple Bit Errors


In data sequence, if there is a change in two or more bits of a data sequence of a transmitter to
receiver, it is known as “Multiple bit errors.”

This type of error mostly occurs in both serial and parallel type data communication networks.

Burst Errors
The change of the set of bits in data sequence is known as “Burst error”. This type of data error
is calculated in from the first-bit change to last bit change.

What is Error Detection & Error Correction?


In digital communication system error will be transferred from one communication system into
another. If these errors are not detected and corrected, then the data will be lost. For effective
communication, system data should transfer with high accuracy. This will be done by first
identifying the errors and them correcting them.

Error detection is a method of detecting the errors which are present in the data transmitted from
a transmitter to receiver in a data communication system.

Here, you can use redundancy codes to find these errors, by adding to the data when it is
transmitted from the source. These codes is called “Error detecting codes”.

Three types of error detection codes are:

 Parity Checking
 Cyclic Redundancy Check (CRC)
 Longitudinal Redundancy Check (LRC)

Parity Checking

 It is also known as a parity check.


 It has a cost-effective mechanism for error detection.
 In this technique, the redundant bit is known as a parity bit. It is appended for every data
unit. The total number of 1s in the unit should become even, which is known as a parity
bit.

Longitudinal Redundancy Check


In this error detection technique, a block of bits is organized in the tabular format. LRC method
helps you to calculate the parity bit for every column. The set of this parity is also sent along
with the original data. The block of parity helps you to check the redundancy.

Cyclic Redundancy Check


Cyclic Redundancy Check is a sequence of redundant that must be appended to the end of the
unit. That’s why the resulting data unit should become divisible by a second, predetermined
binary number.

At the destination, the incoming data needs to be divided by the same number. In case if there is
no remainder, then the data unit is assumed to be correct and is accepted. Otherwise, it indicates
that the data unit is damaged in transmission, and hence it must be rejected.

What is a Hamming code?


Hamming code is a liner code that is useful for error detection up to two immediate bit errors. It
is capable of single-bit errors.
In Hamming code, the source encodes the message by adding redundant bits in the message.
These redundant bits are mostly inserted and generated at certain positions in the message to
accomplish error detection and correction process.

History of Hamming code


 Hamming code is a technique build by R.W.Hamming to detect errors.
 Hamming code should be applied to data units of any length and uses the relationship
between data and redundancy bits.
 He worked on the problem of the error-correction method and developed an increasingly
powerful array of algorithms called Hamming code.
 In 1950, he published the Hamming Code, which widely used today in applications like
ECC memory.
Application of Hamming code
Here are some common applications of using Hamming code:

 Satellites
 Computer Memory
 Modems
 PlasmaCAM
 Open connectors
 Shielding wire
 Embedded Processor

Advantages of Hamming code


 Hamming code method is effective on networks where the data streams are given for the
single-bit errors.
 Hamming code not only provides the detection of a bit error but also helps you to indent
bit containing error so that it can be corrected.
 The ease of use of hamming codes makes it best them suitable for use in computer
memory and single-error correction.

Disadvantages of Hamming code


 Single-bit error detection and correction code. However, if multiple bits are founded
error, then the outcome may result in another bit which should be correct to be changed.
This can cause the data to be further errored.
 Hamming code algorithm can solve only single bits issues.

How to Encode a message in Hamming Code


The process used by the sender to encode the message includes the following three steps:

 Calculation of total numbers of redundant bits.


 Checking the position of the redundant bits.
 Lastly, calculating the values of these redundant bits.

When the above redundant bits are embedded within the message, it is sent to the user.

Step 1) Calculation of the total number of redundant bits.


Let assume that the message contains:

 n– number of data bits


 p – number of redundant bits which are added to it so that np can indicate at least (n + p +
1) different states.
Here, (n + p) depicts the location of an error in each of (n + p) bit positions and one extra state
indicates no error. As p bits can indicate 2p states, 2p has to at least equal to (n + p + 1).
Step 2) Placing the redundant bits in their correct position.
The p redundant bits should be placed at bit positions of powers of 2. For example, 1, 2, 4, 8, 16,
etc. They are referred to as p1 (at position 1), p2 (at position 2), p3 (at position 4), etc.

Step 3) Calculation of the values of the redundant bit.


The redundant bits should be parity bits makes the number of 1s either even or odd.
The two types of parity are ?

 Total numbers of bits in the message is made even is called even parity.
 The total number of bits in the message is made odd is called odd parity.
Here, all the redundant bit, p1, is must calculated as the parity. It should cover all the bit
positions whose binary representation should include a 1 in the 1st position excluding the
position of p1.
P1 is the parity bit for every data bits in positions whose binary representation includes a 1 in the
less important position not including 1 Like (3, 5, 7, 9, …. )
P2 is the parity bit for every data bits in positions whose binary representation include 1 in the
position 2 from right, not including 2 Like (3, 6, 7, 10, 11,…)
P3 is the parity bit for every bit in positions whose binary representation includes a 1 in the
position 3 from right not include 4 Like (5-7, 12-15,… )

Decrypting a Message in Hamming code


Receiver gets incoming messages which require to performs recalculations to find and correct
errors.
The recalculation process done in the following steps:
 Counting the number of redundant bits.
 Correctly positioning of all the redundant bits.
 Parity check

Step 1) Counting the number of redundant bits


You can use the same formula for encoding, the number of redundant bits
2p ? n + p + 1
Here, the number of data bits and p is the number of redundant bits.

Step 2) Correctly positing all the redundant bits


Here, p is a redundant bit which is located at bit positions of powers of 2, For example, 1, 2, 4, 8,
etc.

Step 3) Parity check


Parity bits need to calculated based on data bits and the redundant bits.
p1 = parity(1, 3, 5, 7, 9, 11…)
p2 = parity(2, 3, 6, 7, 10, 11… )
p3 = parity(4-7, 12-15, 20-23… )

Summary
 Transmitted data can be corrupted during communication
 Three types of Bit error are 1) Single Bit Errors 2) Multiple Bit Error 3) Burst Bit errors
 The change made in one bit in the entire data sequence is known as “Single bit error.”
 In data sequence, if there is a change in two or more bits of a data sequence of a
transmitter to receiver, it is known as “Multiple bit errors.”
 The change of the set of bits in data sequence is known as “Burst error”.
 Error detection is a method of detecting the errors which are present in the data
transmitted from a transmitter to receiver in a data communication system
 Three types of error detection codes are 1) Parity Checking 2) Cyclic Redundancy Check
(CRC) 3) Longitudinal Redundancy Check (LRC)
 Hamming code is a liner code that is useful for error detection up to two immediate bit
errors. It is capable of single-bit errors.
 Hamming code is a technique build by R.W.Hamming to detect errors.
 Common applications of using Hamming code are Satellites Computer Memory,
Modems, Embedded Processor, etc.
 The biggest benefit of the hamming code method is effective on networks where the data
streams are given for the single-bit errors.
 The biggest drawback of the hamming code method is that it can solve only single bits
issues.
 We can perform the process of encrypting and decoding the message with the help of
hamming code.

You might also like