0% found this document useful (0 votes)
12 views

Hamming Code

Hammimg Code Computer Networks

Uploaded by

mitali chaudhari
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Hamming Code

Hammimg Code Computer Networks

Uploaded by

mitali chaudhari
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

HAMMING CODE

TOPICS COVERED:
• Error Detection using hamming code
• Error Correction using hamming code
• Sums based on hamming code
• Advantages and disadvantages of hamming code
• Applications of hamming code

PRE-REQUISITE KNOWLEDGE:
• Parity
- Even Parity
- Odd Parity
- Block Parity
• Binary to Decimal Conversion
HAMMING CODE

• Given by R.W. Hamming.


• Hamming code is a set of error-correction codes that can be used to detect and correct the errors that can
occur
when the data is moved or stored from the sender to the receiver.
• Easy to implement.
• 7-bit hamming code is commonly used.

3- Parity Bits Parity bits are often referred to as redundant


4- Data Bits bits.

7 6 5 4 3 2
1
Redundant/Parity bits are extra binary bits that are generated and added to the information-carrying
bits of data transfer to ensure that no bits were lost during the data transfer. The number of parity
bits can be calculated using the following formula:

For p-bits-> 2^p >= p+ m+ 1


where, p-> parity bits m-> data bits

For 7-bits-
>
2^0=1 D7 D6 D5 P4 D3 P2 P1
2^1=2
2^2=4
2^3=8 7 6 5 4 3 2
1m=4
QUESTION: p+m+1-> p+4+1-> p+5
How many parity bits are needed if the data size is 4 bits? 2p >= p+5
ANSWER: 23 >= 3+5 SATISFIED
3 SOLUTION-> Therefore, we need3 parity bits.
7 6 5 4 3 2 1
D7 D6 D5 P4 D3 P2 P1

11 11 10 100 01 010 001


1 0 1 1

P1-> 3,5,7

P2-> 3,6,7

P4-> 5,6,7
Example-1
If the 7-bit hamming code word received by a receiver is 1011011.
Assuming the even parity state whether the received code word is
correct or wrong. If wrong locate the bit having error.
Advantages of the Hamming Code:

• On networks where data streams are delivered for single-bit mistakes, the Hamming coding approach is
effective.
• Hamming code not only detects bit errors but also aids in the identification of bits containing errors so
that they can be repaired.
• Because of their simplicity, hamming codes are ideal for computer memory and single-error correction.

Disadvantages of the Hamming Code:


• Error detection and correction code for single bits. If numerous bits are determined to be incorrect, the
result may be that another bit that should be accurate is modified. This may lead the data to become
even more erroneous.
• The Hamming coding algorithm can only address single-bit problems
• Bandwidth usage is more.
• Extra parity bit added for error correction reduces the bit rate of the transmitter.
Applications of Hamming Code:

• ECC RAM uses Hamming code with SECDED to automatically correct single errors and
raise an alarm on two errors.

• Hamming code is used for data transmission in satellite and space communication.

• They are extensively used in the telecommunication industry.

• They are used in computer memory, modems, and embedded processors.

You might also like