Skip to content

GATE CS 1995 Q1.12 — Data Link Layer: Framing, Error Detection, MAC, Ethernet Bridging

Explain with AI

What is the distance of the following code 000000000000, 010101010101, 000111000111, 011001011001, 111111111111?

Choose one option
View worked solution

Answer: A

The distance of a code (also known as the minimum Hamming distance, dmin⁡d_{\min}) is defined as the minimum Hamming distance between any pair of distinct codewords in the code.

The Hamming distance between two codewords is the number of positions at which the corresponding bits differ.

Let the given codewords be:

  • c1=000000c_1 = 000000
  • c2=010101c_2 = 010101
  • c3=000111c_3 = 000111
  • c4=011001c_4 = 011001
  • c5=111111c_5 = 111111

Let us calculate the Hamming distance d(ci,cj)d(c_i, c_j) for some pairs:

  • d(c1,c2)=weight(000000⊕010101)=weight(010101)=3d(c_1, c_2) = \text{weight}(000000 \oplus 010101) = \text{weight}(010101) = 3
  • d(c2,c3)=weight(010101⊕000111)=weight(010010)=2d(c_2, c_3) = \text{weight}(010101 \oplus 000111) = \text{weight}(010010) = 2
  • d(c2,c4)=weight(010101⊕011001)=weight(001100)=2d(c_2, c_4) = \text{weight}(010101 \oplus 011001) = \text{weight}(001100) = 2

Since the minimum possible Hamming distance between any two distinct codewords in this set is 22, the distance of the code is 22.

Therefore, the correct option is A.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Data Link Layer: Framing, Error Detection, MAC, Ethernet Bridging questions