Back to the 2017 paper

Module 2: Data Link Layer & MAC Sublayer

20172m

What is Hamming code?

Worked SolutionAI Assisted

Hamming code is a forward error-correcting code that adds multiple parity bits to a data word, positioned at specific bit locations (powers of 2: 1, 2, 4, 8, ...), such that the pattern of which parity checks fail directly points to the exact bit position of a single-bit error — allowing the receiver not just to detect, but to locate and correct a single-bit error without retransmission.

Each parity bit covers a specific subset of data bit positions (determined by the binary representation of the position numbers). If an error occurs, the XOR of the failed parity checks gives the binary position number of the erroneous bit directly, which can then simply be flipped to correct it.

A Hamming code with r parity bits can correct 1-bit errors and detect 2-bit errors in a block of up to 2^r - 1 total bits (data + parity), provided 2^r - r - 1 >= (number of data bits).

Similar questions

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.