Explanation : Delimiter flag: 0111
Data sequence: 01110110
So, for a flag of 4 bits we will compare data
sequence with pattern of 3 bits i.e. 011.
Data sequence : 0 1 1 1 0 1 1 0
The underlined bits are found matched, hence, 0
is stuffed.
Thus resulting in the data sequence as 0110101100
which is option (d).
Explanation : The given 8-bit delimiter pattern is 01111110.
The output bit-string after stuffing is 01111100101.
The above bold underline bit is stuffed bit.
So input bit-string must be 0111110101.