Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Error

Detection
and
Correction
“Data can be corrupted during transmission.
For reliable communication, errors must be
detected and corrected.”
What is Error?

Ans: Error is a condition when the output information does not match with the
input information. During transmission, digital signals suffer from noise that can
introduce errors in the binary bits travelling from one system to other.
That means a 0 bit may change to 1 or a 1 bit may change to 0.
Error Detection: Error detection is the detection of errors
caused by noise or other impairments during transmission
from the transmitter to the receiver.

Error correction: Error correction is the detection of errors


and reconstruction of the original, error-free data.
Type of Error:
 Single bit error.
 Multi bits error.
 Burst bits error.
Single bit error: In a frame, there is only one bit, anywhere though, which is corrupt.
Sent Received
0 1 0 1 0 0 1 1 1 0

Multi bits error: Frame is received with more than one bits in corrupted state.
Sent Received
1 1 0 1 1 1 0 0 0 1

Burst bits error: Frame contains more than1 consecutive bits corrupted..
Sent Received
0 1 0 1 0 0 0 1 0 0
Hamming code: In telecommunication, Hamming codes are a family of
linear error-correcting. Hamming codes can detect up to two-bit or
correct one-bit errors without detection of uncorrected errors.

Parity bit: A parity bit, or check bit is a bit added to the end of a string
of binary code that indicates where the number of bits in the string with
the value one is even or odd. Parity bits are used as the simplest form
of error detecting code.
Error Detection and Correction process:
We are using hamming code for error detection and correction.

 Suppose ASCII code Y = 1011001. The data word is 7-bits.

 Through the four hamming parity bits h1,h2,h3,h4 as 1,2,4 and 8 position with this
word and arrange the 11 bits as follows:

Bit position:

11 10 9 8 7 6 5 4 3 2 1

1 0 1 h4 1 0 0 h3 1 h2 h1
Y = 1011001
Bit position:
11 10 9 8 7 6 5 4 3 2 1

1 0 1 h4 1 0 0 h3 1 h2 h1

 Select position of logic bit 1 for finding hamming code.


Here logic bits 1 number of position as 3, 7, 9 and 11

Now convert this data to binary code and addition this


data using XOR operation.
3 =0 0 1 1
Avoid carry when applying addition. 7 =0 1 1 1
9 =1 0 0 1
11 =1 0 1 1
0 1 1 0
h4 h3 h2 h1
 Putting value of h1,h2,h3 and h4 for get hamming code.

11 10 9 8 7 6 5 4 3 2 1

1 0 1 0 1 0 0 1 1 1 0

 Again select position of logic bit 1 for finding hamming code.


 Here the logic bits are 1 number of position as 2, 3, 4, 7, 9 and 11.
 Addition this data applying XOR operation.
 If additional result all bits are 0. Then there is no error.

2 =0 0 1 0
3 =0 0 1 1
4 =0 1 0 0
7 =0 1 1 1
9 =1 0 0 1
11 = 1 0 1 1
0 0 0 0
Y = 1011001
 Suppose change 1 to 0 no of bit position 9.

11 10 9 8 7 6 5 4 3 2 1

1 0 0 0 1 0 0 1 1 1 0

 Applying hamming code rules.

2 =0 0 1 0
3 =0 0 1 1
4 =0 1 0 0
7 =0 1 1 1
11 =1 0 1 1
1 0 0 1 =9

11 10 9 8 7 6 5 4 3 2 1

1 0 0 0 1 0 0 1 1 1 0
Y = 1011001
 Suppose change 0 to 1no of bit position3.

11 10 9 8 7 6 5 4 3 2 1

1 0 1 0 1 0 0 1 0 1 0

 Applying hamming code rules.

2 =0 0 1 0
4 =0 1 0 0
7 =0 1 1 1
9 =1 0 0 1
11 =1 0 1 1
0 0 1 1 =3

11 10 9 8 7 6 5 4 3 2 1

1 0 0 0 1 0 0 1 0 1 0
Y = 1011001
 Suppose change 1 to 0 no of bit position11.

11 10 9 8 7 6 5 4 3 2 1

0 0 1 0 1 0 0 1 1 1 0

 Applying hamming code rules.

2 =0 0 1 0
3 =0 0 1 1
4 =0 1 0 0
7 =0 1 1 1
9 =1 0 0 1
1 0 1 1 = 11

11 10 9 8 7 6 5 4 3 2 1

1 0 0 0 1 0 0 1 1 1 0
USAGE OF HAMMING CODE

 Hamming coding is only of use as a source code as a computer program to


compress the characters. As a result it is only carried out in the front-end
processor.

 In Bangladesh railway business(Signaling) we have to follow specific safety


standards. An important aspect is the data transferee is closed transmission system.
ADVANTAGE OF HAMMING CODE

Extremely effective on networks where the


data streams are given to single-bit errors.
DISADVANTAGE OF HAMMING CODE

 Single-bit detection and correction code, if multiple


bits are errored then the errors are detected but
the resultant could cause another bit that is correct
to be changed, causing the data to be further
errored.

 Hamming code only can solve up to single


bits.

You might also like