In a data link protocol, the frame delimiter flag is given by 0111. Assuming…

2004

In a data link protocol, the frame delimiter flag is given by 0111. Assuming that bit stuffing is employed, the transmitter sends the data sequence 01110110 as  

  1. A.

    01101011

  2. B.

    011010110

  3. C.

    011101100

  4. D.

    0110101100

Attempted by 166 students.

Show answer & explanation

Correct answer: D

Key rule: To avoid creating the frame delimiter 0111 inside the data, insert a 0 after any run of two consecutive 1s (i.e., limit runs of 1s to at most two).

Original data: 01110110

  1. Output 0 → output becomes 0

  2. Output 1 → output becomes 01 (consecutive-1s count = 1)

  3. Output next 1 → output becomes 011 (consecutive-1s count = 2). Because we reached two consecutive 1s, insert a 0 → output becomes 0110

  4. Process the next original 1 → output becomes 01101 (consecutive-1s count restarts at 1)

  5. Next bit 0 → output becomes 011010 (resets consecutive-1s count)

  6. Next 1 → output becomes 0110101 (consecutive-1s count = 1)

  7. Next 1 → output becomes 01101011 (consecutive-1s count = 2). Insert a 0 → output becomes 011010110

  8. Final original 0 → output becomes 0110101100

Stuffed output: 0110101100

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir