2. ERROR DETECTION AND CORRECTION CODES
When the digital information in the binary form
is transmitted from one circuit or system
to another circuit or system an error mayoccur.
This means the signal corresponding to 0 may
change to 1 or vice-versa due to presence of noise
To maintain data integrity between transmitter
and receiver, extra bit or more than one bit are
added in the data.
These extra bits allow the detection and sometimes
the correction of error in the data.
2
3. TYPES OF ERROR:
There are two types of errors.
Single bit error.
Burst error.
Single bit error:
There is only one bit changed in the code.
10101 10100
Burst error:
There are more than one bit changed in received code.
101010010 111010011
Here the length of error is six after six bits error is occuring.
Changed bit
Changed bits
4. DETECTION AND CORRECTION OF ERROR
Codes which allow only error detection are called error
detecting codes and codes which allow error detection and
correction are called error detecting and correcting codes
Types of error detector.
Simple parity bit(even, odd)
2d parity
Check sum
CRC(cyclic redundancy check)
5. Parity bit
• A parity bit is used for the purpose of detecting
errors during transmission of binary information.
• A parity bit is an extra bit included with a
binary message to make the number of 1s either
odd or
ERROR DETECTION:
3
6. The parity error detection system just described detects any odd
number of errors.
However, it cannot detect an even number of error because such
errors will not destroy the parity of the transmitted group ofbits
Block parity:
When several binary words are transmitted or received in
succession, the resulting collection of bits can be regarded as a
block of data, having rows and columns.
Example: four eight bit words in succession form an 4x8block.
Parity bits can then be assigned to both rows andcolumns.
This scheme is known as block parity
It makes it possible to correct any single error occurring in a
data word and to detect any two errors in aword.
CONTD…
6
7. CORRECTION OF ERRORS
Correction of error is doned by using hamming
code method.
This method is used for both the detection and for
the correction of error code send to the reciever
8. HAMMING CODE
Hamming code not only provides the detection of a bit
error, but also identifies which bit is in error so that it can
be corrected.
Thus hamming code is called error detecting and
correcting code.
The code uses a number of parity bits(dependent on the
number of information bits) located at certain position in a
group.
Number of parity bits:
The number of parity bits depends on the number of
information bits
If the number of bits is designated as x, then the number of
parity bits P is determined using the relation
2𝑝 ≥ 𝑥+ 𝑃+1
9. CONTD…
Location of the parity bits in a code:
• The parity bits are located in the positions that are
numbered corresponding to ascending powers of
two(1,2,4,8,….).
• Therefore, for 7-bit code, locations for parity bits and
information bits are as follows:
D4, D3,D2,P3, D1,P2,P1
Assigning values to parity bit:
• In hamming code , each parity bit provides a check on
certain other bits in the total code, therefore we must
know the value of these others in order to assign the
parity bit value.
10. CONTD…
Assignment of P1:
This parity bit checks all bit locations, including itself, that
have 1s in the same location in the binary location
numbers.
Assignment of P2:
This parity bit checks all bit locations, including itself, that
have 1s in the middle bit.
Assignment of P3:
This parity bit checks all bit locations, including itself, that
have 1s in the left-most bit.
11. SINGLE ERROR CORRECTION AND DOUBLE
ERROR DETECTION
With the light modification, it is possible to construct
hamming code for single error correction and double error
detection.
A one more parity bit is added in the hamming code to
ensure hamming code contains an even number of ones.
The resulting hamming code enables single error correction
and double error detection.
When overall parity bit is correct, there is no single error
during the transmission of the code.
If overall parity bit is incorrect, then there is single error
and the bit position of the error can be indicated by binary
number formed after checking the parity bits.