In a binary Hamming Code the number of check digits is r then number of…

2015

In a binary Hamming Code the number of check digits is r then number of message digits is equal to :

  1. A.

    2𝑟−1

  2. B.

    2𝑟−𝑟−1

  3. C.

    2𝑟−𝑟+1

  4. D.

    2𝑟+𝑟−1

Attempted by 619 students.

Show answer & explanation

Correct answer: B

Answer: The number of message digits is 2^r − r − 1.

Derivation:

  • A Hamming code with r check bits produces 2^r distinct syndromes (binary patterns of the r check bits).

  • To detect or correct a single-bit error we must distinguish n+1 possibilities: 'no error' or an error in any one of the n bit positions.

  • Therefore 2^r ≥ n + 1, which implies n ≤ 2^r − 1. Taking the maximum usable n gives n = 2^r − 1.

  • The number of message (data) bits k = n − r = (2^r − 1) − r = 2^r − r − 1.

Explore the full course: Tpsc Assistant Technical Officer