Nepedia
Back to Discover
Fluent Reader
💻

Hamming code

technology Maturity 7-9 Next article →

Computers use bits to store and move information. Sometimes, a bit flips from a zero to a one, or a one to a zero. This is called an error. These mistakes can cause a computer to stop working or give the wrong answer. Hamming codes are a special way to fix these errors. They belong to a family of error-correcting codes. These codes are very important for keeping digital information safe and accurate.

Hamming(7,4)
Hamming(7,4)

To fix errors, Hamming codes use extra bits called parity bits. These bits work like a clever overlapping check. Each data bit is checked by several different parity bits at once. If one bit flips, the different parity bits will show a specific pattern of mistakes. This pattern acts like a map. It tells the computer exactly which bit is wrong. Once the computer finds the wrong bit, it can flip it back to the right value. This happens automatically without needing a person to help.

Hamming(7,4)
Hamming(7,4)

Richard Hamming invented these codes in 1950. He worked at Bell Labs during the late 1940s. At that time, he used a machine called the Bell Model V. This machine used electromechanical relays to work. People fed information into it using paper tape with small holes. If the machine found an error, it would stop and flash lights. This was very frustrating for Hamming when he worked on weekends. He did not want to restart his whole program every time a mistake happened.

Hamming(7,4)
Hamming(7,4)

There are many different types of Hamming codes. One famous version is the Hamming(7,4) code. This code uses seven bits in total. Four of those bits are the actual data, and three are parity bits. Hamming also studied the "distance" between codes. This is called the Hamming distance. A code with a distance of three can fix one-bit errors. Some special versions, called extended Hamming codes, use an extra bit. These can find two-bit errors and fix one-bit errors.

Hamming(7,4)
Hamming(7,4)

You can see these codes working in your own devices. Many computers use a special kind of memory called ECC memory. ECC stands for error-correcting code memory. It uses Hamming codes to keep the computer running smoothly. Without this, tiny errors in the memory could crash your computer. It is a way to make sure the digital world stays reliable. This clever math helps technology work even when small mistakes occur.

Hamming(7,4)
Hamming(7,4)
399 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Hamming(7,4).svg
Hamming(7,4).svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.