How many check bits are required for a 16-bit data word to detect 2-bit errors…
2013
How many check bits are required for a 16-bit data word to detect 2-bit errors and correct single-bit errors using a Hamming code (SEC-DED)?
Answer: B. 6 — A Hamming code built only for single-error correction (SEC) needs the smallest check-bit count r satisfying 2r ≥ m + r + 1 for an m-bit data word. To also…
- A.
5
- B.
6
- C.
7
- D.
8
Attempted by 401 students.
Show answer & explanation
Correct answer: B
A Hamming code built only for single-error correction (SEC) needs the smallest check-bit count r satisfying 2r ≥ m + r + 1 for an m-bit data word. To also detect double-bit errors (SEC-DED), one further overall parity bit is added on top of that SEC code, so the total check-bit count p must instead satisfy 2(p−1) ≥ m + p.
For a 16-bit data word, m = 16. Testing p = 5 in the SEC-DED inequality: 2(p−1) = 24 = 16, and m + p = 16 + 5 = 21; since 16 is less than 21, 5 check bits do not satisfy the inequality.
Testing p = 6: 2(p−1) = 25 = 32, and m + p = 16 + 6 = 22; since 32 is at least 22, the inequality is satisfied.
Since p = 5 fails and p = 6 is the smallest value that satisfies the inequality, 6 is the minimum number of check bits required.
Independent check: build the SEC-DED code from a plain SEC Hamming code. For m = 16, the smallest r satisfying 2r ≥ m + r + 1 is r = 5, since 25 = 32 ≥ 16 + 5 + 1 = 22, while 24 = 16 does not cover 16 + 4 + 1 = 21. Adding the one extra overall parity bit needed for double-error detection gives 5 + 1 = 6 total check bits, matching the result above.
So a 16-bit data word needs 6 check bits for a SEC-DED Hamming code, which matches the official ISRO 2013 Computer Science answer key.
Explore the full course: Iocl Engineers Officers Grade A Paper 2