Date post: | 30-May-2018 |
Category: |
Documents |
View: | 229 times |
Download: | 1 times |
of 20
8/14/2019 Improved Hamming Code for Error Detection
1/20
1
Improved Hamming Code forError Detection and Correction
U. K. Kumar, Member, IEEE, and B. S.
Umashankar2007 2nd International Symposium on
Wireless Pervasive Computing
8/14/2019 Improved Hamming Code for Error Detection
2/20
2
Outline
Introduction
Proposed Improved Hamming Code
Conclusion
Improved Hamming Code for Error Detection and Correction
8/14/2019 Improved Hamming Code for Error Detection
3/20
3
well known for its single-bit error detection &correction capability.
based on the of adding r redundancy bits to n databits such that 2r n + r + 1.
2r -1 bitsHamming Code r redundancy bits (2r -1) -rdata bits redundancy bitsbe interspersed at bit positions
2n (n = 0, 1, 2, 3) with the original data bits. Data bitsAll other bit positions are for the data to be
encoded. (positions 3, 5, 6, 7, 9..etc.)
Hamming code
Introduction
8/14/2019 Improved Hamming Code for Error Detection
4/20
4
Rule & How to Remember
Position 1: check 1 bit, skip 1 bit, check 1 bit, skip 1 bit,
etc. (1,3,5,7,9,11,13,15,...) Position 2: check 2 bits, skip 2 bits, check 2 bits, skip 2
bits, etc. (2,3,6,7,10,11,14,15,...)
Position 4: check 4 bits, skip 4 bits, check 4 bits, skip 4
bits, etc. (4,5,6,7,12,13,14,15,20,21,22,23,...) Position 8: check 8 bits, skip 8 bits, check 8 bits, skip 8
bits, etc. (8,9,10,11,12,13,14,15,24,25,26,27,...)
total number of ones in the positions is odd -> set check
bit 1. total number of ones in the positions is even -> set
check bit 0.
Hamming code
Introduction
8/14/2019 Improved Hamming Code for Error Detection
5/20
5
An example for 7-bit Hamming code is given
below( for comparison with the proposedimprovement.)
the 7-bit data to be transmitted is 0110010.
the 11-bit data actually transmitted is011P001P0PP
the Ps refer to the Hamming bits that are to be
calculated and interspersed at bit positions 1,2, 4, & 8.
Hamming code
Introduction
8/14/2019 Improved Hamming Code for Error Detection
6/20
6
An example for 7-bit Hamming code 0110010.
the 11-bit data actually transmitted is
011P001P0PP bit position 1is even parity at bit positions 1, 3, 5, 7, 9,
& 11. Thus the Hamming bit at position 1 will be 0.
bit position 2
is even parity at bit positions 2, 3, 6, 7,
10, & 11. Thus the Hamming bit at position 2 will be 1.
bit position 4is even parity at bit positions 4, 5, 6, & 7.Thus the Hamming bit at position 4 will be 1.
bit position 8is even parity at bit positions 8, 9, 10, &11. Thus the Hamming bit at position 8 will be 0.
Hamming code
Introduction
8/14/2019 Improved Hamming Code for Error Detection
7/20
7
Thus the 11-bit data actually transmitted is01100011010.
For the calculation of Hamming bits atpositions 1, 2, 4, & 8, even-parity checkswere performed on 6, 6, 4, & 4 bitsrespectively.
Thus a total of 20 bits are involved in theprocess of Hamming bits calculations.
Hamming code
Introduction
8/14/2019 Improved Hamming Code for Error Detection
8/20
8
The error-detection and correction process in Hamming code isas illustrated in Table I.
11-bit data actually transmitted is 01100011010
S0-bit position 1 : 1357911S1-bit Position 2 : 23671011S2-bit position 4 : 4567S3-bit position 8 : 891011
TABLE I
error-detection and correction using hamming code
Hamming code
Introduction
8/14/2019 Improved Hamming Code for Error Detection
9/20
9
After error detection & correction, if any, the data bitshave to be reassembled by removing the
redundancy bits. Hamming code is normally used for transmission of 7-bit
data item.
Scaling it for larger data lengths results in a lot of
overhead due to interspersing the redundancy bitsand their removal later.
Hamming code
Introduction
8/14/2019 Improved Hamming Code for Error Detection
10/20
10
IMPROVED HAMMING CODE
The number of redundancy bits, r to be appended to n-bit data is obtained such that the relation (2r-11) n issatisfied.
The number of redundancy bits in this method is sameas that for Hamming code for some values of n.
But in some cases, it will be just one more redundancybit than needed in the Hamming code.
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
11/20
11
IMPROVED HAMMING CODE
consider the same example. The 7-bit data
to be transmitted is 0110010. For 7-bit data, the number of redundancy
bits required will be 4.
the 11-bit data actually transmitted isPPPP0110010.
the Ps refer to the redundancy bits that are
to be calculated and appended at bitpositions 8, 9, 10, & 11.
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
12/20
12
the 11-bit data actually transmitted is PPPP0110010.
bit position 8is even parity at bit positions 1, 3, 5,7 and bit position 8. Thus the bit at position 8 willbe 1.
bit position 9is even parity at bit positions 2, 3, 6,
7 and bit position 9. Thus the bit at position 9 willbe 0.
bit position 10is even parity at bit positions 4, 5, 6,7 and bit position 10. Thus the bit at position 10will be 0.
bit position 11 is even parity considering only theredundancy bits8,9,10,11. Thus the bit atposition 11 will be 1.
IMPROVED HAMMING CODE
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
13/20
13
Thus the 11-bit data actually transmitted is10010110010.
For the calculation of bits at positions 8, 9,10, & 11, even parity checks were performed
on 5, 5, 5, & 4 bits respectively. Thus a total of 19 bits are involved in the
process of calculation of redundancy bits.
IMPROVED HAMMING CODE
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
14/20
14
The error-detection and correction process in the improvedmethod is as illustrated in Table II.
the 11-bit data actually transmitted is 10010110010.
S0-bit position 8 : 13578S1-bit Position 9 : 23679S2-bit position 10: 456710S3-bit position 11: 891011
IMPROVED HAMMING CODE
TABLE IIerror-detection and correction using improved hamming code
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
15/20
15
Suppose the received information is 10010100010, with anerror at bit position 5.
the status of parity check S0 is shown as Feven parityerror at bit positions 1, 3, 5, 7 & 8. the status of parity check S1 is shown as T no even
parity error at bit positions 2, 3, 6, 7 & 9.
the status of parity check S2 is shown as F even parityerror at bit positions 4, 5, 6, 7& 10
the status of parity check S3 is shown as T evenparity occurs at bit positions 8, 9, 10 & 11.
Interpreting F as 1 and T as 0 in the status of parity check,we find that the error is at bit position 0101 i.e. 5. Bit5,which was received as 0, is corrected as 1.
IMPROVED HAMMING CODE
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
16/20
16
Suppose the received information is 10000110010, withan error at redundancy bit position 8.
Then the status of parity check will turn out to beFTTF.
If status of parity check is FXXX, it implies thatthere is an error only in a redundancy bit.
The actual redundancy bit in error can easily beidentified by the position of the of F. However, this isnot a data bit there is no need for any correction.
Suppose the received information is 10010110010, withno error. Then the status of parity check will turn outto be TTTT, implying error at bit position 0000 i.e. 0.This is treated as no error.
IMPROVED HAMMING CODE
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
17/20
17
After error detection & correction, if any, the redundancy
bits can be removed easily and there is no need to
reassemble the data bits.
This improved method can be scaled easily for larger
data lengths. The redundancy bits just get appended to
the data.
IMPROVED HAMMING CODE
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
18/20
18
As an example, let us consider a 56-bit data stream, which
can contain eight 7-bit ASCII characters or seven bytes.
This needs 7 redundancy bits, which are selected as in theprevious example.
In spite of an extra redundancy bit when compared to
the Hamming code, the number of bits involved in the
process of calculation of redundancy bits is much less
than in the Hamming code.
It can be shown that it involves a total of 172 bits in the
process of calculation of these 7 redundancy bits. In comparison, in the Hamming code it involves a total
of 182 bits in the process of calculation of 6 redundancy
bits.
IMPROVED HAMMING CODE
PROP OSED IMPROVED HAMMING CODE
8/14/2019 Improved Hamming Code for Error Detection
19/20
19
In the proposed improvementtheredundancy bits are appended at the end of
data bits.
This eliminates the overhead of interspersing
the redundancy bits at the sender end and their
removal at the receiver end after checking for
single-bit error and consequent correction, if any.
Further the effort needed in identifying the values
of the redundancy bits is lower in the proposed
novel method.
Conclusion
Proposed Improvement vs. Hamming Code
8/14/2019 Improved Hamming Code for Error Detection
20/20
20
Hamming code is normally used for transmission of 7-bitdata item.
Scaling it for larger data lengths results in a lot ofoverhead due to interspersing the redundancy bits andtheir removal later.
In contrast, the proposed method is highly scalable
without such overhead.
there is only 7 bit overhead for a 56-bit data stream, which ismuch less compared to 4 bit overhead for a 7-bit data.
Because of this feature this new method is suitable fortransmission of large size data bit-streams as long asthere is likelihood of at the most single-bit error duringtransmission.
Proposed Improvement vs. Hamming Code
Conclusion