The number of parity bits in a 12-bit Hamming code is

Electrical Engineering XYZ MCQs

The number of parity bits in a 12-bit Hamming code is:

  1. 5
  2. 4
  3. 8
  4. 6

Correct answer:

In a Hamming code, if there are m parity bits, they can cover the data bits from 1 up to 2m. Subtracting out the parity bits, we are left with 2mm−1 bits for data.

Given that in the problem there are 12 data bits, we want to find the smallest �m such that:

2mm − 1

Now we can try different values of �m to find the minimum value that satisfies this inequality.

  • For m=1: 21−1−1=0; which is less than 12.
  • For m=2: 22−2−1=3; which is less than 12.
  • For m=3: 23−3−1=4; which is less than 12.
  • For m=4: 24−4−1=11; which is equal to 12.

So, m=4 satisfies the inequality. Therefore, a 12-bit Hamming code would have 4 parity bits.

Hence, the correct answer to the multiple-choice question is: 2. 4

Leave a Reply