What’s Block Encoding?

Print anything with Printful



Block coding is a form of forward error correction that converts messages into specific codes and sends them as a block of data with a predetermined length. This reduces errors caused by noise during transfer and allows messages to be decipherable when they arrive. Hamming weight and distance are used to determine the likelihood of errors, and longer, more uniform codes are used to reduce the Hamming distance. This is similar to how longer sentences in a noisy room make it easier to understand the conversation.

Part of coding theory, block coding is a form of forward error correction (FEC), also known as channel coding, which converts messages into specific codes and sends the information as a block of data with a predetermined length . Larger blocks of data make it easier for the receiving computer to decode the information and correct errors that occur during the transfer. Block codes and convolutional codes are two commonly used code types in FEC. These types of code allow a message to be sent over an unreliable connection and still be decipherable when it arrives.

The use of block encoding is necessary due to the noise that occurs when a message is sent. When data has to travel a long distance or over an unreliable connection, weight and Hamming distance are used to determine the likelihood of errors. The hamming weight is the number of digits needed to express all possible code combinations, and the hamming distance is the number of errors that should occur before a bit represents legitimate but wrong information.

For example, if a sender using block encoding wanted to send a message that could only use three possible codes of three digits each, the Hamming weight would be three. The codes could be 000, 010 and 011. If an error caused a digit to change, such as changing 000 to 010, the code would read as a legitimate code (010) but not the code intended by the sender (000 ). So the Hamming distance for this code is one because only one digit needs to change to cause an error that the computer can’t correct.

To reduce the Hamming distance and reduce errors, data is sent as a block of code encoded in specific code words of a certain length. The data bits of the original message are referred to as k bits. The k bits are translated into the corresponding n bits, which are codes that have been selected to be used as the longest codes for each k bit. The ones or zeros are added to make the bits of uniform length and reduce the Hamming distance. Then these blocks of n bits are transmitted to the receiving computer.

Thinking about block code is easier when you compare it to two people having a conversation. When talking in a noisy room or shouting over a long distance, there is more room for error in what the person hearing is hearing. If the sentence is long, the person can correct more errors by looking at the whole sentence in context, but short sentences have a higher error rate because it is more difficult to decipher what the person is saying.

For example, if one person yells “Red cat” and the other hears “Feed cat,” they interrupt the sentence incorrectly. If, however, the first person said “I have a red colored cat” and the second heard “I have a colored cat to eat”, the context of the sentence makes it easy to determine the person who actually said “red” and not “fed”. This is the principle behind block coding and the use of longer, more uniform codes to help computers accurately translate a block of information.




Protect your devices with Threat Protection by NordVPN


Skip to content