0% found this document useful (0 votes)
12 views5 pages

Module 2 - Error Correction

The document discusses error correction in computer networks, outlining two main methods: Forward Error Correction, where the receiver corrects errors, and Backward Error Correction, where the sender retransmits data. It highlights Hamming Code as a widely used error-correcting code that detects and corrects single-bit errors by adding redundancy. Additionally, it explains the types of parity bits and the algorithm for implementing Hamming Code, emphasizing its efficiency and application in various communication systems.

Uploaded by

tanvikhicchi
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)
12 views5 pages

Module 2 - Error Correction

The document discusses error correction in computer networks, outlining two main methods: Forward Error Correction, where the receiver corrects errors, and Backward Error Correction, where the sender retransmits data. It highlights Hamming Code as a widely used error-correcting code that detects and corrects single-bit errors by adding redundancy. Additionally, it explains the types of parity bits and the algorithm for implementing Hamming Code, emphasizing its efficiency and application in various communication systems.

Uploaded by

tanvikhicchi
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/ 5

Error Correction in Computer Networks

Once the errors are detected in the network, the deviated bits sequence needs to
be replaced with the right bit sequence so that the receiver can accept the data
and process it.
This method is called Error Correction.
We can correct the errors in the Network in two different ways which are listed
below:
 Forward Error Correction: In this Error Correction Scenario, the
receiving end is responsible for correcting the network error. There is no
need for retransmission of the data from the sender’s side.
 Backward Error Correction: the sender is responsible for retransmitting
the data if errors are detected by the receiver. The receiver signals the
sender to resend the corrupted data or the entire message to ensure
accurate delivery.
However, there is one of the most widely used Error Correction methods which is
called ‘Hamming Code’ which was designed by R.W. Hamming.

Hamming Code in Computer Network


Hamming code is an error-correcting code used to ensure data accuracy during
transmission or storage.
Hamming code detects and corrects the errors that can occur when the data is
moved or stored from the sender to the receiver.
This simple and effective method helps improve the reliability of communication
systems and digital storage.
It adds extra bits to the original data, allowing the system to detect and correct
single-bit errors.
It is a technique developed by Richard Hamming in the 1950s.

Types of Parity Bits


A parity bit is a bit appended to a data of binary bits to ensure that the total
number of 1’s in the data is even or odd.
Parity bits are used for error detection.
There are two types of parity bits:
 Even Parity Bit: In the case of even parity, for a given set of bits, the
number of 1’s are counted. If that count is odd, the parity bit value is set
to 1, making the total count of occurrences of 1’s an even number. If the
total number of 1’s in a given set of bits is already even, the parity bit’s
value is 0.
 Odd Parity Bit: In the case of odd parity, for a given set of bits, the
number of 1’s are counted. If that count is even, the parity bit value is set
to 1, making the total count of occurrences of 1’s an odd number. If the
total number of 1’s in a given set of bits is already odd, the parity bit’s
value is 0.

Algorithm of Hamming Code


Hamming Code is simply the use of extra parity bits to allow the
identification of an error.
Step 1: Write the bit positions starting from 1 in binary form (1, 10, 11,
100, etc).
Step 2: All the bit positions that are a power of 2 are marked as parity bits
(1, 2, 4, 8, etc).
Step 3: All the other bit positions are marked as data bits.
Step 4: Each data bit is included in a unique set of parity bits, as
determined its bit position in binary form:
 a. Parity bit 1 covers all the bits positions whose binary representation
includes a 1 in the least significant position (1, 3, 5, 7, 9, 11, etc).
 b. Parity bit 2 covers all the bits positions whose binary representation
includes a 1 in the second position from the least significant bit (2, 3, 6, 7,
10, 11, etc).
 c. Parity bit 4 covers all the bits positions whose binary representation
includes a 1 in the third position from the least significant bit (4–7, 12–15,
20–23, etc).
 d. Parity bit 8 covers all the bits positions whose binary representation
includes a 1 in the fourth position from the least significant bit bits (8–15,
24–31, 40–47, etc).
 e. In general, each parity bit covers all bits where the bitwise AND of the
parity position and the bit position is non-zero.
Step 5: Since we check for even parity set a parity bit to 1 if the total
number of ones in the positions it checks is odd. Set a parity bit to 0 if the
total number of ones in the positions it checks is even.
Determining The Position of Redundant Bits
A redundancy bits are placed at positions that correspond to the power of
2. As in the above example:
 The number of data bits = 7
 The number of redundant bits = 4
 The total number of bits = 7+4=>11
 The redundant bits are placed at positions corresponding to power of 2
that is 1, 2, 4, and 8
Suppose the data to be transmitted is 1011001 from sender to receiver,
the bits will be placed as follows:

Features of Hamming Code


 Error Detection and Correction: Hamming code is designed to detect
and correct single-bit errors that may occur during the transmission of
data. This ensures that the recipient receives the same data that was
transmitted by the sender.
 Redundancy: Hamming code uses redundant bits to add additional
information to the data being transmitted. This redundancy allows the
recipient to detect and correct errors that may have occurred during
transmission.
 Efficiency: Hamming code is a relatively simple and efficient error-
correction technique that does not require a lot of computational
resources. This makes it ideal for use in low-power and low-bandwidth
communication networks.
 Widely Used: Hamming code is a widely used error-correction technique
and is used in a variety of applications, including telecommunications,
computer networks, and data storage systems.
 Single Error Correction: Hamming code is capable of correcting a
single-bit error, which makes it ideal for use in applications where errors
are likely to occur due to external factors such as electromagnetic
interference.
 Limited Multiple Error Correction: Hamming code can only correct a
limited number of multiple errors. In applications where multiple errors are
likely to occur, more advanced error-correction techniques may be
required.

You might also like