Information Theory and Coding Basics
A SECDED code, which corrects 1-bit errors and detects 2-bit errors, is added to 32 bits of data. The number of check bits r of a Hamming code is the smallest value satisfying 2^r ≥ number of data bits + r + 1, and SECDED adds 1 bit of overall parity to this. Which of the following is the number of check bits needed?
- A6 bits
- B7 bits
- C8 bits
Show answer and explanation
Answer: B. 7 bits
With r = 5, 2⁵ = 32 < 32 + 5 + 1 = 38, which is not enough, and with r = 6, 2⁶ = 64 ≥ 32 + 6 + 1 = 39, so the Hamming code needs 6 check bits. SECDED adds 1 bit of overall parity to distinguish 1-bit errors from 2-bit errors, giving 7 bits and a 39-bit codeword. For 64 bits of data the same calculation gives 8 bits, which yields the 72-bit width used for ECC in server memory.
- A. 6 bits is the number of check bits of a Hamming code that only corrects 1-bit errors. Detecting 2-bit errors needs one more bit of overall parity.
- B. Correct. 6 + 1 = 7 bits.
- C. 8 bits is the number of check bits needed to add SECDED to 64 bits of data.
Continue: 9 more Information Theory and Coding Basics questions