GATE Computer ScienceHardGATE CS (PYQ pattern)

An 8-bit data word d1…d8 = 1 0 1 1 0 0 1 0 is stored with a 12-bit single-error-correcting Hamming code: positions 1, 2, 4, 8 hold check bits and positions 3, 5, 6, 7, 9, 10, 11, 12 hold d1…d8 in that order. Each check bit at position 2ᵏ gives even parity over all positions whose index has bit k set. What is the 12-bit codeword (position 1 first)?

  1. A. 101001110010
  2. B. 011101100010
  3. C. 101100101001
  4. D. 111001110010

Correct answer: A. 101001110010

Data positions holding 1: 3, 6, 7, 11. Check 1 covers 3,5,7,9,11 → 1+0+1+0+1 → c1 = 1; check 2 covers 3,6,7,10,11 → 1+1+1+0+1 = 4 → c2 = 0; check 4 covers 5,6,7,12 → 0+1+1+0 → c4 = 0; check 8 covers 9–12 → 0+0+1+0 → c8 = 1. Codeword 101001110010. Odd parity gives 011101100010; appending the check bits after the data gives 101100101001; counting c2's group as odd gives 111001110010.

More Computer Organization and Architecture questions

Exams that ask this topic