Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

hamming code for encoding 32 bits

Status
Not open for further replies.

shaiko

Advanced Member level 5
Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Visit site
Activity points
18,302
Hello,
How many extra bits are needed in order to encode a 32 bit word using hamming code?
 

You need 6 extra bits.

The Hamming codes are perfect, but they don't exist for any number of data bits.
Two of them are Hamming(31, 26) and Hamming(63, 57).
The first number is the total number of bits, and the second is the number of data bits.
You can take Hamming(63, 57) and use only 32 of the 57 data bits.
You will have 32 data bits + 6 parity bits = 38 bits.
When doing the calculations, you can pad the 32 data bits to 57 bits by using any fixed pattern known by both the transmitter and the receiver, all zeros is OK.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Thanks.

1. If you have an example of a VHDL Hamming (63,57) - please post it...
2. Also, do you know of any FEC algorithm that can be tailored to any bit length efficiently (not just to "magic" lengths as with Hamming) ?
 

1. I don't have VHDL code

2. Since the Hamming code is perfect, you can't beat it. 6 extra bits is the minimum to correct single bit errors in 32 data bits. The problem with a pure Hamming code is that everything is accepted. Whatever you get, it looks like the correct data or a single-bit correctable error. If you have two wrong bits it will be "corrected" to the wrong value.
By adding one more bit, a single error correcting, double error detecting (SEC-DED) code can be designed.
32 data bits + 7 parity bits, which seems to be a common solution.

Read this:
https://www.hackersdelight.org/ecc.pdf
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top