Skip to main content

GATE CSE 2021Computer Networks › Data Link Layer, MAC Protocols & Error DetectionVerified

GATE CSE 2021 PYQ: Assume that a 12 12 12 -bit Hamming codeword consisting of 8 8 8 -bit data and 4 4 4 check bits is d 8 d 7 d…

Assume that a 12-bit Hamming codeword consisting of 8-bit data and 4 check bits is d8d7d6d5c8d4d4d3d2c4d1c2c1d_8d_7d_6d_5c_8d_4d_ 4d_3d_2c_4d_1c_2c_1, where the data bits and the check bits are given in the following tables: d8d7d6d5d4d3d2d1110x0101Data bitsc8c4c2c1y010Check bits\overset{\textbf{Data bits}}{\begin{array}{|c|c|c|c|} \hline d_{8} & d_{7} & d_{6} & d_{5} & d_{4} & d_{3} & d_{2} & d_{1} \\\hline 1 & 1 & 0 & x & 0 & 1 & 0 & 1 \\\hline \end{array}}\qquad \overset{\textbf{Check bits}}{\begin{array}{|c|c|c|c|} \hline c_{8} & c_{4} & c_{2} & c_{1} \\\hline y & 0 & 1 & 0 \\\hline \end{array}} Which one of the following choices gives the correct values of xx and yy?

  1. A
    xx is 0 and yy is 0
    Correct answer
  2. B
    xx is 0 and yy is 1
  3. C
    xx is 1 and yy is 0
  4. D
    xx is 1 and yy is 1

Answer

(A) x x x is 0 0 0 and y y y is 0 0 0

Approach

The codeword is a standard 12-bit even-parity Hamming code: check bits occupy positions that are powers of 2 (1, 2, 4, 8) and the codeword layout given (d8 d7 d6 d5 c8 d4 d3 d2 c4 d1 c2 c1) is exactly positions 12 down to 1. The check bits c1, c2, c4, c8 each enforce even parity over the positions whose index has that bit set. Solving the two parity equations that involve the unknowns x (=d5) and y (=c8) pins them down; the other two equations serve as consistency checks.

Taking the codeword as the 12-bit layout shown (positions 12..1 with c8 at position 8), the c1 parity equation forces x=0 and the c8 equation then forces y=0. The c2 and c4 groups independently confirm the codeword is an even-parity Hamming word. So x=0, y=0 - option A.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.