# Is there better than hamming code for correcting errors

As known, hamming code can be represented by (7,4) where data are 4 bits, and 3 bits for parity, and (15,11) where 11 bits are data and 4 bits for parity. It can correct up to one bit, or detect two bits without correcting.

Parity bits will cause an issue of spectral efficiency or in data rate, so my question, is there another code better than hamming code which can correct more errors with less parity bits ?

• Comments are not for extended discussion; this conversation has been moved to chat.
– Peter K.
Nov 30, 2018 at 17:08
• @MarcusMüller .. Ok, so which codes is existed? and is there code which can detect and correct errors better than hamming code? that's what i'm searching for it now. if you know, your answer will be appreciated. It's not my field to explain and understand all those codes, but I'll try to understand the useful things, so i'm asking here to choose the best things to read and understand. thank you for your understanding. Nov 30, 2018 at 17:09
• check out the Wikipedia page: en.wikipedia.org/wiki/Hamming_code And please use chat, not comments, for extended discussion. (11,7) doesn't exist as a Hamming code.
– Peter K.
Nov 30, 2018 at 17:10
• OK.. thank you so much. I got it. I've read about Hamming code, but I'm searching if another code is existed which can correct more errors with less parity bits. Nov 30, 2018 at 17:11
• @New_student Read the first couple of chapters of this book: inference.org.uk/mackay/itila/book.html
– MBaz
Nov 30, 2018 at 17:42

There is a concept called perfect codes, the Hamming codes are perfect. If you have an $$\ell$$ error-detecting (and $$\lfloor \frac \ell 2 \rfloor$$ error-correcting) code $$\mathcal C$$ of length $$n$$, with $$M$$ codewords. You have a disjoint ball of radius $$\lfloor \frac \ell 2 \rfloor$$ arround each code word. If the balls we'ren't disjoint a word couldn't be corrected uniquely despite $$\le \lfloor \frac \ell 2 \rfloor$$ error's occuring. Thus such a code contains at least, $$M$$ times the volume of these balls, words.
If it contains exactly this minemal amount, the code can not be improved ( $$\lfloor \frac \ell 2 \rfloor$$ can't be raised without increasing the length.), and is called perfect. The Hamming codes are perfect, if you want to be able to correct more errors you need more bits.