📝 Hamming Distance Error Detecting Technique (11 MCQs)
Measuring Separation Between Binary Codewords
Hamming distance measures how many bit positions differ between two equal-length binary words. In an error-control code, the minimum Hamming distance between any pair of valid codewords determines how far received patterns can move before they become confused with another valid word. This geometric separation supports both error detection and correction. This distinction helps the receiver choose an appropriate integrity check for each frame.
Minimum Distance and Error-Detection Capability
If the minimum distance is d-min, the code can guarantee detection of up to d-min minus one bit errors. It can guarantee correction of up to t errors when d-min is at least 2t plus one. Correction needs a larger separation because the receiver must identify the nearest original codeword unambiguously. Both endpoints must use matching parameters for the check to be interpreted correctly.
Computing Hamming Distance from Two Bit Strings
To calculate distance, compare two codewords position by position and count unequal bits. For 101101 and 100001, the third and fifth positions differ, so their Hamming distance is two. The minimum distance of a code is the smallest result across every pair of distinct valid codewords. This check takes place before the receiver accepts the protected information.
A Code with Minimum Distance Three
A Hamming (7,4) code has minimum distance three. It therefore guarantees detection of up to two bit errors when used for detection, or correction of one bit error with nearest-codeword decoding. The receiver uses parity-check results to form a syndrome that identifies a single-bit error position. The example makes the coding rule visible through a reproducible bit sequence.
Using Distance for Forward Error Correction
Hamming distance supports block-code design and forward error correction. A larger distance increases protection but usually requires more redundant bits or reduces the number of information patterns available at a fixed code length. It is especially useful when retransmission is slow or impractical. Its suitability depends on traffic type, delay limits, and acceptable redundancy overhead.
Detection and Correction Bounds Are Different
'Distance counts matching bits' is false; it counts differing positions. 'Distance three corrects two errors' is false; it corrects one. 'Minimum distance is the distance from zero' is false; it is the smallest distance between any two distinct valid codewords. These distinctions prevent confusion between detection, recovery, and general data integrity.
Applying Hamming-Distance Formulas to Codes
Compute pairwise distances, find the minimum, and apply the correct bound for the requested task. Distinguish guaranteed detection from guaranteed correction, state whether the question assumes errors are detected or corrected, and avoid treating the Hamming distance of one pair as the code's minimum unless all pairs are checked. Show intermediate steps and state assumptions behind any calculated result.
Hamming Distance Terms
- Hamming distance - Counts differing bit positions.
- Minimum distance - Separates valid codewords clearly.
- Codeword - Encoded sequence of bits.
- Syndrome - Indicates failed code constraints.
- Detection bound - Maximum guaranteed detected errors.
- Correction bound - Maximum guaranteed repaired errors.
📝 All Hamming Distance Error Detecting Technique MCQs
Q1. What operation is performed on the final sum to obtain the checksum in the traditional checksum algorithm?
📖 Explanation: The checksum is formed by taking the bitwise complement (one's complement) of the accumulated sum, so the correct operation is the one's complement of the sum.
Q2. If a single 16‑bit word in a message is altered during transmission, will the traditional checksum detect the error?
📖 Explanation: A single‑word error changes the total sum, so after complementing the receiver obtains a non‑zero checksum, causing the message to be rejected.
Q3. Compared with a cyclic redundancy check (CRC), the traditional 16‑bit checksum
📖 Explanation: A CRC is designed to detect a wider variety of error patterns, including many burst errors, whereas a simple checksum can miss some errors, making it less robust.
Q4. Which characteristic of the Fletcher checksum allows it to catch transposition errors that the traditional checksum cannot?
📖 Explanation: The Fletcher algorithm multiplies each data word by its position (or accumulates running sums), so swapping two words changes the weighted total and the checksum, revealing the transposition.
Q5. Two different messages produce the same checksum value. What can be inferred about the transmission?
📖 Explanation: Identical checksum values for distinct messages indicate that the error pattern was not captured by the checksum, meaning an error could have occurred without being flagged.
Q6. If one 16‑bit word is increased by and another is decreased by before checksum calculation, what is the effect on the resulting checksum?
📖 Explanation: Because the addition and subtraction cancel each other, the overall sum fed into the complement operation is the same as without the modifications, leaving the checksum unchanged.
Q7. Using one's complement addition, what is the checksum for the two 16‑bit words and ?
📖 Explanation: Adding the words gives . The one's complement of is , which is the checksum transmitted with the data.
Q8. A transmitted message differs from the received one by a Hamming distance of 2. Can the traditional checksum always detect this error?
📖 Explanation: The checksum is linear with respect to bitwise addition; two independent bit flips can cancel each other's effect on the sum, so a distance‑2 error is not guaranteed to be caught.
Q9. What is the main difference between wrapping overflow (adding left and right halves) and simply truncating the sum before complementing?
📖 Explanation: In one's complement arithmetic, any carry out of the most‑significant bit is added back to the least‑significant bit, effectively performing a modulo operation and ensuring correct checksum behavior.
Q10. If after adding all 16‑bit words the intermediate sum equals , what is the final checksum transmitted?
📖 Explanation: The algorithm complements the sum; the one's complement of is , so the checksum sent is all zeros, which the receiver interprets as a valid message.
Q11. Why is the accumulator variable for the sum defined as 32 bits while each data word is only 16 bits?
📖 Explanation: During the addition of many 16‑bit words, carries can propagate beyond 16 bits; using a 32‑bit accumulator prevents loss of these overflow bits before they are wrapped back.