Update Seminar Form
Hamming Code for Error Detection & Correction Codes was invented by Richard Hamming. This error detection and Correction method detects and corrects a single-bit error.
Hamming Code Algorithm-
While transmitting the data-
1. Take ASCII value of the character.
2. Add 64 to the ASCII value.
3. Compute the binary equivalent of the sum..
4. Break the binary into two parts, each of 4-bits..
5. Locate the obtained two 4-bit binary numbers in the table (Hamming codes) and replace them with corresponding hamming code words..
6. Transmit the code words.
While receiving the data-.
1. For each 7-bit data received, hamming distance is calculated with respect to each codeword present in the table..
2. The codeword, which gives the 1 as hamming distance is the correct code word that should have been received..
3. The last three bits are removed from the correct codeword..
4. Remaining 4-bits form the data word..
5. Obtain the 4-bit data word from the two consecutive code words (corrected) and combine them together..
6. The data word obtained is the corrected error-free word..
Data word to be transmitted- A ASCII value of ‘A’- 65.
Add 64. Value obtained= 65+64=129
Binary equivalent of 129=10000001
Two 4-bit parts- 1000
Hamming code for- 1000 is 1000110
0001 is 0001011
On receiving error occurs, say, instead of 1000110 we receive 1000010
, and instead of 0001011 we receive 1001011
After computing the hamming distance, we get the corrected codewords and after removing the right-most 3 bits we get, 1000 and 0001.
As we combine the two we get, 10000001 which is equal to 129=’A’.
Using the table created for Hamming code, one can detect and correct the error in the code, if any.
Prof. Ashay Dharwadker