Since 8 bit delimeter pattern = 01111110.

So whenever 0111111( 6’s ones) is matched we will add one extra bit.

But in the solution extra bit is added just after 011111(5’s ones).

Forozan @296

D is the correct answer. we add an extra 0 bit after 011111 not after 6 1’s

I understand why the second 0 was inserted. But what about the first 0? Why do we need to add a 0 even if we have five 1s followed by a 0?