A bit-stuffing based framing protocol uses an 8-bit delimiter pattern of…
201420182025
A bit-stuffing based framing protocol uses an 8-bit delimiter pattern of 01111110. If the output bit-string after stuffing is 01111100101, then the input bit-string is
- A.
0111110100
- B.
0111110101
- C.
0111111101
- D.
0111111111
Attempted by 220 students.
Show answer & explanation
Correct answer: B
Key insight: after any sequence of five consecutive 1s in the original data, a 0 is inserted (stuffed). To recover the original input, remove any 0 that immediately follows five consecutive 1s.
Step 1: Scan the stuffed output 01111100101 and find a run of five 1s followed immediately by 0. Here the substring 11111 is followed by a 0.
Step 2: Remove that stuffed 0. Removing the 0 after the five 1s turns 01111100101 into 0111110101.
Therefore the original input bit-string is 0111110101.
A video solution is available for this question — log in and enroll to watch it.