Flag: 01111110
Data: 1000111111100111110100011111111111000011111
whenever we encounter 11111(5 ones) after a 0 we would insert 0 in the data after 011111 0
Note that the last zero above(bold one) is not a part of original data stream.
Positions where 0 will be stuffed are indicated by P highlighted in yellow.
Ref : Forouzan
Note : 0 will be stuffed after every stream of 11111 which follows a 0 in the data stream.
100011111P110011111P0100011111P111111000011111P
Data Stream after Bit Stuffing
10001111101100111110010001111101111110000111110 (P are replaced by 0)