Question

Assume that a 12-bit Hamming codeword consisting of 8-bit data and 4 check bits is d8d7d6d5c8d4d3d2c4d1c2c1d_8 d_7 d_6 d_5 c_8 d_4 d_3 d_2 c_4 d_1 c_2 c_1, where the data bits and the check bits are given in the following tables:

Data bits
d8d7d6d5d4d3d2d1
110x0101
Check bits
c8c4c2c1
y010

Which one of the following choices gives the correct values of xx and yy?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2021 answer key

Solution

Set up parity check equations using 1-based bit indexing for standard Hamming code positions.

The 12-bit Hamming codeword structure places check bits at powers of 2 (positions 1, 2, 4, 8) and data bits at all other positions:

  • Position 1: c1c_1
  • Position 2: c2c_2
  • Position 3: d1d_1
  • Position 4: c4c_4
  • Position 5: d2d_2
  • Position 6: d3d_3
  • Position 7: d4d_4
  • Position 8: c8c_8
  • Position 9: d5d_5
  • Position 10: d6d_6
  • Position 11: d7d_7
  • Position 12: d8d_8

We are given the values:
d1=1,d2=0,d3=1,d4=0,d5=x,d6=0,d7=1,d8=1d_1 = 1, d_2 = 0, d_3 = 1, d_4 = 0, d_5 = x, d_6 = 0, d_7 = 1, d_8 = 1
c1=0,c2=1,c4=0,c8=yc_1 = 0, c_2 = 1, c_4 = 0, c_8 = y

Parity bit c1c_1 covers all positions whose binary representation has bit 0 set (1, 3, 5, 7, 9, 11):

c1=d1⊕d2⊕d4⊕d5⊕d7c_1 = d_1 \oplus d_2 \oplus d_4 \oplus d_5 \oplus d_7

Substituting known values:

0=1⊕0⊕0⊕x⊕1=x⊕(1⊕1)=x⊕0=x  ⟹  x=00 = 1 \oplus 0 \oplus 0 \oplus x \oplus 1 = x \oplus (1 \oplus 1) = x \oplus 0 = x \implies x = 0

Parity bit c8=yc_8 = y covers positions whose binary representation has bit 3 set (8, 9, 10, 11, 12):

c8=d5⊕d6⊕d7⊕d8c_8 = d_5 \oplus d_6 \oplus d_7 \oplus d_8

With x=0x = 0, d5=0d_5 = 0:

y=0⊕0⊕1⊕1=0y = 0 \oplus 0 \oplus 1 \oplus 1 = 0

Thus, x=0x = 0 and y=0y = 0, which matches option A.

Final answer

A

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2021 Computer Science and Information Technology (CS, Set-1)
Question
39 of 65, printed as CS Q.29
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.