GateAI
Data Link Layer

GATE CSE 2021 Set 1 · Q29

MCQ2 marksMedium

Time

Assume that a 12-bit Hamming codeword consisting of 8-bit data and 4 check bits is d8d7d6d5c8d4d3d2c4d1c2c1d_8d_7d_6d_5c_8d_4d_3d_2c_4d_1c_2c_1, where the data bits and the check bits are given in the following tables:

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

GATE CSE 2021 Set 1 Q29 diagram 1
GATE CSE 2021 Set 1 Q29 diagram 2

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) x is 0 and y is 0.

Data Link Layer

In a 12-bit Hamming code with codeword bits numbered from position 1 to position 12 (right-to-left):

Bit Position121110987654321Bitd8d7d6d5c8d4d3d2c4d1c2c1Value110xy0100110\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \text{Bit Position} & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 \\ \hline \text{Bit} & d_8 & d_7 & d_6 & d_5 & c_8 & d_4 & d_3 & d_2 & c_4 & d_1 & c_2 & c_1 \\ \hline \text{Value} & 1 & 1 & 0 & x & y & 0 & 1 & 0 & 0 & 1 & 1 & 0 \\ \hline \end{array}

Using even parity for the check bits:

  1. Parity bit c1c_1 covers all positions with the 1st1^{\text{st}} bit of their binary index as 1 (positions 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

    Substitute the given values (c1=0,d1=1,d2=0,d4=0,d5=x,d7=1c_1 = 0, d_1 = 1, d_2 = 0, d_4 = 0, d_5 = x, d_7 = 1):

    0=1⊕0⊕0⊕x⊕10 = 1 \oplus 0 \oplus 0 \oplus x \oplus 1
    0=x  ⟹  x=00 = x \implies x = 0
  2. Parity bit c8c_8 (yy) covers all positions with the 4th4^{\text{th}} bit of their binary index as 1 (positions 8, 9, 10, 11, 12):

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

    Substitute x=0,d6=0,d7=1,d8=1x = 0, d_6 = 0, d_7 = 1, d_8 = 1:

    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).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Data Link Layer previous year question is Q29 of the GATE CSE 2021 Set 1 paper. Find more GATE CSE PYQs on Data Link Layer in Computer Networks, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Data Link Layer PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Data Link Layer in GATE CSE

Data Link Layer has 27 GATE CSE PYQs across 17 papers from 2013 to 2026. 10 of them are 2-mark MCQs like this one, and GATE CSE 2021 Set 1 has 3.

How GATE tests Data Link Layer

More from GATE CSE 2021 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2021 Set 1 · Q29 · MCQ

Assume that a 12-bit Hamming codeword consisting of 8-bit data and 4 check bits is d8d7d6d5c8d4d3d2c4d1c2c1, where the data bits and the check bits are given in the following tables: Which one of the following choices gives the correct values of x and y?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.