Error Detection and Correction
Error Detection and Correction
Members:
Belano, Royet
Sali, Jarrie
Chiong, Tyrone
Ali, Ashween
Ong Chua, Nurico Jay
TABLE OF CONTENTS
1
Title Page
______________________________________________________________________________
________
1. How do errors
occur………………………………………………………………………………………………
……………3
encountered…………………………………………………………………..3
methods?....................................................................5
4. Error
correction?.........................................................................................................
.....7
5. Hamming
code………………………………………………………………………………………………
…………………….8
2
How do Errors occur?
- Error occurs when the information received doesn't match what was
sent. Digital signals can get affected by noise, which might cause the
bits (0s and 1s) to change during transmission. For example, a 0 could
accidentally turn into a 1 or vice versa.
● Single-Bit Error
3
This happens when only one bit in the data unit (a 0 or 1) is changed during
transmission or Only one bit in the frame is corrupted
● Multiple-Bit Error:
When two or more bits in a data unit change during transmission, but
unlike burst errors, the changed bits are not necessarily consecutive. In other
words, the errors are spread out across the data.
4
● Burst Error:
A burst error occurs when two or more bits in the data unit change. These
errors often happen in groups, affecting multiple consecutive bits, making them
more difficult to detect and correct.
● Advantages:
a. Simple to implement and computationally inexpensive.
b. Useful for detecting single-bit errors.
● Disadvantages:
a. Can only detect an odd number of errors (e.g., if two bits are
flipped, the parity check may not detect it).
b. Provides no information about the location or type of error.
1. Advantages:
5
a. Improved Error Detection: More effective than a single-
dimensional parity check as it can detect errors affecting
multiple bits, including some errors that affect multiple bits in a
row or column.
b. Error Location: Can help identify the location of errors within
the data matrix by pinpointing which row and column the error
occurred in.
2. Disadvantages:
a. Increased Overhead: Requires additional parity bits for each
row and column, which increases the amount of redundant
data transmitted.
b. Limited Error Correction: While it can detect errors in a larger
number of bits, it cannot correct them. Errors affecting multiple
rows and columns simultaneously might not be detected.
c. Complexity: More complex to implement compared to a single-
dimensional parity check, requiring additional computation and
memory for parity calculations and storage.
3. Checksum
A checksum is a value derived from the data being transmitted or
stored, calculated using a mathematical algorithm. This value is sent
along with the data. The receiver performs the same calculation on
the received data and compares the result with the transmitted
checksum. If they match, the data is considered error-free;
otherwise, an error is detected.
1. Advantages:
a. Simple and effective for detecting errors in data blocks.
b. Widely used in network protocols and file transfers.
2. Disadvantages
a. May not detect all types of errors (e.g., errors that cancel each
other out).
b. Less effective for error correction and more suited for error
detection.
6
Cyclic Redundancy Check (CRC) is an error detection technique
that uses polynomial division to detect changes to raw data. Data is
treated as a polynomial and divided by a fixed polynomial,
generating a remainder (CRC value) that is appended to the data.
The receiver performs the same polynomial division and checks if
the CRC value matches. It is highly effective at detecting accidental
errors in data transmission.
1. Advantages:
a. Highly effective at detecting accidental changes to raw data.
b. Robust against various types of errors, including burst errors.
2. Disadvantages:
a. More complex to compute than parity checks or checksums.
b. Still does not provide error correction; only detection.
In this method, when any error is detected in the data at the receiver's end,
the receiver sends a request for retransmission of the entire data unit.
7
To correct errors effectively, it's crucial not only to detect errors but also to
determine their exact location. Error detection can be achieved with a
single additional bit, known as a parity bit, but this bit alone cannot correct
errors. To correct errors, especially single-bit errors, we need to know
which specific bit is erroneous. This is where the concept of redundant bits
comes into play.
2r>=d+r+1
● Hamming code adds extra bits, called parity bits, to your data to help
detect and fix errors.
● Place parity bits at positions that are powers of 2 (like 1, 2, 4, 8). The
other positions hold the data bits.
● Each parity bit checks certain data bits. For instance, parity bit 1
checks bits where the least significant binary digit is 1, parity bit 2
checks bits where the second least significant binary digit is 1, and
so on. Parity bits are set so that the total number of 1s in their group
is even.
8
Forming the Codeword:
● Combine the data bits and parity bits according to their positions to
create the complete codeword.
● When the receiver gets the codeword, they recalculate the parity bits
and compare them with the received ones. If there’s a mismatch, the
receiver can identify and correct the error using the parity bits.