Reputation: 1
I am a little confused regarding the bit stuffing.
I understand the procedure if the frame tags is not possible to be shown in the sequence but what will happen if the frame tag occur in the frame?
For example:
if the frame tag is 100001
and the rule for the bit stuffing is for every 4 zeros put 1 which is the result of the sequence 0110100001100
?
Upvotes: -1
Views: 126
Reputation: 5907
If you have that rule you will confuse the receiver. The idea is that the receiver doesn't mix real data with the flag. So, for that flag (100001), the rule could be: in the data after 3 zeroes, add a 1. Then in the data received it is not possible to have the flag pattern 100001 because if there was such pattern it would have become 1000101. A flag will never appear in the received data. The receiver, whenever it sees 3 zeroes and after that a 1 comes, it de-stuffs that 1 and it knows it is reading data. If a 0 comes then it will probably be a flag and another 1 should arrive.
Upvotes: 0