in Computer Networks
9,909 views
5 votes
5 votes
Flag: 01111110
Data: 1000111111100111110100011111111111000011111
bit stuff the given data?
in Computer Networks
9.9k views

4 Comments

i have followed standard convention, one thing you should notice that you should not stuff o if you get '011111' after stuffing '0'....because newly created '011111' pattern was not present in the data, it is created due to stuffing..
0
0

@joshi_nitish. '0' will be stuffed or '1' ???

Because if we stuff a '0', receiver will not be able to distinguish the flag and data. ...0111110...

I have confusion in this topic. Can you provide some link for this. _/\_

0
0
0
0

1 Answer

4 votes
4 votes

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)

edited by

4 Comments

if we add stuff bit as 0 after six 1's then it is not consistent. Receiver will not able to decode message correctly. So we add 0 after five 1's.  ;)
0
0
I did not get you. Can you explain with an example?
0
0

See the discussion and answer of this question—

https://gateoverflow.in/2058/gate2014-3-24

0
0

Related questions