Skip to content Skip to navigation

Connexions

You are here: Home » Content » Error-Correcting Codes: Hamming Codes

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • OrangeGrove display tagshide tags

    This module is included inLens: Florida Orange Grove Textbooks
    By: Florida Orange GroveAs a part of collection: "Fundamentals of Electrical Engineering I"

    Click the "OrangeGrove" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Rice DSS - Braille display tagshide tags

    This module is included inLens: Rice University Disability Support Services's Lens
    By: Rice University Disability Support ServicesAs a part of collection: "Fundamentals of Electrical Engineering I"

    Comments:

    "Electrical Engineering Digital Processing Systems in Braille."

    Click the "Rice DSS - Braille" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Rice Digital Scholarship display tagshide tags

    This module is included in aLens by: Digital Scholarship at Rice UniversityAs a part of collection: "Fundamentals of Electrical Engineering I"

    Click the "Rice Digital Scholarship" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Bookshare

    This module is included inLens: Bookshare's Lens
    By: Bookshare - A Benetech InitiativeAs a part of collection: "Fundamentals of Electrical Engineering I"

    Comments:

    "Accessible versions of this collection are available at Bookshare. DAISY and BRF provided."

    Click the "Bookshare" link to see all content affiliated with them.

  • Featured Content display tagshide tags

    This module is included inLens: Connexions Featured Content
    By: ConnexionsAs a part of collection: "Fundamentals of Electrical Engineering I"

    Comments:

    "The course focuses on the creation, manipulation, transmission, and reception of information by electronic means. It covers elementary signal theory, time- and frequency-domain analysis, the […]"

    Click the "Featured Content" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • Lens for Engineering

    This module is included inLens: Lens for Engineering
    By: Sidney Burrus

    Click the "Lens for Engineering" link to see all content selected in this lens.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Error-Correcting Codes: Hamming Codes

Module by: Don Johnson. E-mail the author

Summary: A description of some strategies for minimizing there errors in a transmitted bit-stream.

For the (7,4) example, we have 2NK1=7 2 N K 1 7 error patterns that can be corrected. We start with single-bit error patterns, and multiply them by the parity check matrix. If we obtain unique answers, we are done; if two or more error patterns yield the same result, we can try double-bit error patterns. In our case, single-bit error patterns give a unique result.

Table 1: Parity Check Matrix
e He
1000000 101
0100000 111
0010000 110
0001000 011
0000100 100
0000010 010
0000001 001

This corresponds to our decoding table: We associate the parity check matrix multiplication result with the error pattern and add this to the received word. If more than one error occurs (unlikely though it may be), this "error correction" strategy usually makes the error worse in the sense that more bits are changed from what was transmitted.

As with the repetition code, we must question whether our (7,4) code's error correction capability compensates for the increased error probability due to the necessitated reduction in bit energy. Figure 1 shows that if the signal-to-noise ratio is large enough channel coding yields a smaller error probability. Because the bit stream emerging from the source decoder is segmented into four-bit blocks, the fair way of comparing coded and uncoded transmission is to compute the probability of block error: the probability that any bit in a block remains in error despite error correction and regardless of whether the error occurs in the data or in coding buts. Clearly, our (7,4) channel code does yield smaller error rates, and is worth the additional systems required to make it work.

Figure 1: The probability of an error occurring in transmitted K=4 K 4 data bits equals 11 p e 4 1 1 p e 4 as 1 p e 4 1 p e 4 equals the probability that the four bits are received without error. The upper curve displays how this probability of an error anywhere in the four-bit block varies with the signal-to-noise ratio. When a (7,4) single-bit error correcting code is used, the transmitter reduced the energy it expends during a single-bit transmission by 4/7, appending three extra bits for error correction. Now the probability of any bit in the seven-bit block being in error after error correction equals 11 p e 7(7 p e )1 p e 6 1 1 p e 7 7 p e 1 p e 6 , where p e p e is the probability of a bit error occurring in the channel when channel coding occurs. Here (7 p e )1 p e 6 7 p e 1 p e 6 equals the probability of exactly on in seven bits emerging from the channel in error; The channel decoder corrects this type of error, and all data bits in the block are received correctly.
Probability of error occurring
Probability of error occurring (hamming.png)

Note that our (7,4) code has the length and number of data bits that perfectly fits correcting single bit errors. This pleasant property arises because the number of error patterns that can be corrected, 2NK1 2 N K 1 , equals the codeword length NN. Codes that have 2NK1=N 2 N K 1 N are known as Hamming codes, and the following table provides the parameters of these codes. Hamming codes are the simplest single-bit error correction codes, and the generator/parity check matrix formalism for channel coding and decoding works for them.

Table 2: Hamming Codes
NN KK EE (efficiency)
3 1 0.33
7 4 0.57
15 11 0.73
31 26 0.84
63 57 0.90
127 120 0.94

Unfortunately, for such large blocks, the probability of multiple-bit errors can exceed the number of single-bit errors unless the channel single-bit error probability p e p e is very small. Consequently, we need to enhance the code's error correcting capability by adding double as well as single-bit error correction.

Exercise 1

What must the relation between NN and KK be for a code to correct all single- and double-bit errors with a "perfect fit"?

Solution

In a length-NN block, NN single-bit and N(N1)2 N N 1 2 double-bit errors can occur. The number of non-zero vectors resulting from H c ^ H c ^ must equal or exceed the sum of these two numbers.

2NK1N+N(N1)2   or   2NKN2+N+22 2 N K 1 N N N 1 2   or   2 N K N 2 N 2 2
(1)
The first two solutions that attain equality are (5,1) and (90,78) codes. However, no perfect code exists other than the single-bit error correcting Hamming code. (Perfect codes satisfy relations like Equation 1 with equality.)

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks