CS FundamentalsHardTCS NQT · Infosys pattern

How many parity bits does a single-error-correcting Hamming code need to protect 29 data bits?

  1. A. 6~1
  2. B. 6
  3. C. 5
  4. D. 7

Correct answer: B. 6

The smallest r with 2^r ≥ m + r + 1 is used. For m = 29, r = 5 gives 2^5 = 32 < 35, but r = 6 gives 2^6 = 64 ≥ 36.

More Computer Networks questions

Exams that ask this topic