Skip to content

GATE CS 2014 Set 3 Q24 — Data Link Layer: Framing, Error Detection, MAC, Ethernet Bridging

Explain with AI

A bit-stuffing based framing protocol uses an 8-bit\text{8-bit} delimiter pattern of 01111110.01111110. If the output bit-string after stuffing is 01111100101,01111100101, then the input bit-string is:

Choose one option
View worked solution

Answer: B

In a bit-stuffing protocol with the delimiter pattern 0111111001111110 (which contains six consecutive 11s), the transmitter inserts (stuffs) a 0 after every five consecutive 1s in the input data stream to prevent the delimiter from appearing in the payload.

To recover the original input bit-string from the stuffed output, we perform the reverse process (destuffing):

  • Scan the stuffed bit-string from left to right.
  • Whenever we encounter five consecutive 1s, the immediately following 0 is identified as the stuffed bit and is removed.

Let's apply this to the given stuffed output: 0111110010101111100101

  1. We scan the bits: 00, followed by five consecutive 11s: 1111111111.
    Current sequence: 0 1 1 1 1 1⏟five 1s0\ \underbrace{1\ 1\ 1\ 1\ 1}_{\text{five 1s}}
  2. The next bit in the stream is a 00. Since it immediately follows five consecutive 11s, this 00 is the stuffed bit and must be removed:
    Stuffed stream: 0 1 1 1 1 1 0‾ 0 1 0 10\ 1\ 1\ 1\ 1\ 1\ \mathbf{\underline{0}}\ 0\ 1\ 0\ 1
  3. Removing the stuffed 0\mathbf{0} yields the original input stream:
    Input stream: 01111101010111110101

Thus, the correct input bit-string is 01111101010111110101, which corresponds to Option B.

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