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
- A.
01101011
- B.
011010110
- C.
011101100
- 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
Output 0 → output becomes 0
Output 1 → output becomes 01 (consecutive-1s count = 1)
Output next 1 → output becomes 011 (consecutive-1s count = 2). Because we reached two consecutive 1s, insert a 0 → output becomes 0110
Process the next original 1 → output becomes 01101 (consecutive-1s count restarts at 1)
Next bit 0 → output becomes 011010 (resets consecutive-1s count)
Next 1 → output becomes 0110101 (consecutive-1s count = 1)
Next 1 → output becomes 01101011 (consecutive-1s count = 2). Insert a 0 → output becomes 011010110
Final original 0 → output becomes 0110101100
Stuffed output: 0110101100
A video solution is available for this question — log in and enroll to watch it.