Safekipedia
Coding theory

Block code

Adapted from Wikipedia · Adventurer experience

A diagram showing different types of error-correcting codes used in computer programming and information theory, with axes representing protected symbols and needed check symbols.

Block codes are a special kind of code used in coding theory. They help make sure data is sent or stored correctly, even if some mistakes happen along the way.

Many different block codes exist, like Reed–Solomon codes, Hamming codes, Hadamard codes, Expander codes, Golay codes, Reed–Muller codes, and Polar codes. These codes follow clear math rules and are easy to work with.

Block codes take a small group of bits (pieces of data) and make them bigger. This extra information helps find and fix errors. Because they work on whole groups at once, block codes are simple and useful in many things we use every day.

The block code and its parameters

Error-correcting codes help us send digital data safely over tricky connections, like wireless networks. When we use block codes, the data is split into small, fixed pieces called messages. Each message is changed into a codeword—a special version of the message—by the block code. These codewords are sent out. The receiver tries to reconstruct the original messages, even if some mistakes happen during transmission.

Block codes have a few key features: the type of symbols used (like binary for computers), the length of each message, the length of each codeword, and how different the codewords are from each other. These features help decide how well the code can fix errors and how much extra information it needs to send.

Examples

There are many types of block codes used to fix mistakes in data. One of the first was the Hamming(7,4) code, made by Richard W. Hamming in 1950. This code turns a message of 4 bits into a codeword of 7 bits by adding 3 extra bits for checking.

Other important block codes include Reed–Solomon codes, which help many modern technologies. There are also Rank codes and Hadamard codes, each with their own special ways to encode information.

Error detection and correction properties

Block codes help us find and fix mistakes when information is sent or stored. A code with a certain "distance" can spot mistakes. For example, a code with distance 3 can detect up to 2 errors.

These codes can also correct some errors. A code with distance 3 can fix up to 1 error. This works because the space around each correct code word does not overlap with others. More advanced methods can handle even more errors.

Lower and upper bounds of block codes

Hamming limit[clarification needed]

Block codes are ways to protect information by putting it into blocks. These blocks help find and fix mistakes when information is sent or stored.

There are rules, called bounds, that show the limits of how well these codes can work. One rule says the speed of the code and its ability to fix mistakes can't both be too high. Other rules give more details about these limits, helping experts find the best ways to protect data.

Sphere packings and lattices

Block codes are connected to the sphere packing problem, which people have studied for years. Imagine pushing pennies together on a table; they form a neat hexagon pattern, like a bee's nest. But block codes work in many more dimensions that we can't easily picture.

For example, the powerful Golay code used in deep space communications works in 24 dimensions.

We can think about packing shapes in different ways. In higher dimensions, we can pack more tightly, leaving less empty space. Some special codes, called perfect codes, use all the space. As we add more dimensions, the number of nearby points grows very quickly. This means there are more ways for noise to cause mistakes, which is a key challenge for all block codes.

This article is a child-friendly adaptation of the Wikipedia article on Block code, available under CC BY-SA 4.0.

Images from Wikimedia Commons. Tap any image to view credits and license.