in Computer Networks edited by
2,591 views
10 votes
10 votes
In bit stuffing protocol for frame synchronization, if stuff bit pattern is $01110$ then how many zero bits stuffed by transmitter white transmitting given frame (except start of transmission and end of transmission)?

$\text{Data frame:} 1011101111011111110$
in Computer Networks edited by
2.6k views

4 Comments

1

Stuff bit pattern :01110 
dataFrame :1011101111011111110 
After stuffing 1011010110110110111110: 3Bit stuffing

After stuffing 101101011011 - here it forms 011 so why not adding a zero after this?

0
0
@habibkhan sir thank you for clearing the doubt....
0
0
aish...we dont do stuffing over stuffing...one time stuffing ensures that whenever the receiver will get 011 followed by 0 it will remove zero by itself
0
0

2 Answers

4 votes
4 votes
Best answer

Flag : 01110

Data Frame: 1011101111011111110 

Data after bit stuffing: 1011010110110011011011010

or your reference find the following screenshot from the book:

selected by

1 comment

Thanx @manu00x for correction.
Even in RFC which is standard  they also do the stuffing like this:
Good Read : https://tools.ietf.org/rfc/rfc935.txt
0
0
4 votes
4 votes

Stuff bit pattern :01110 
dataFrame :1011101111011111110 
After stuffing 1011010110110110111110: 3Bit stuffing

[Edit: I didn`t cover the edge case where stuffing 0 also ruining the pattern thus updated answer is correct i.e
Data after bit stuffing: 1011010110110011011011010 Thanks @ manu00x for information ]

edited by

3 Comments

edited

this answer is not correct, a 0 will be stuffed after each two 1's. for your reference find the following screenshot from the book:

0
0

@ manu00x is this excerpt from Forouzan ?

0
0
I exactly don't remember, i read from many books, but i am sure that it's not from Forozuan, but it's either from Tanenbaum or Kurose,that is I am sure!
0
0

Related questions

3 votes
3 votes
1 answer
3