in Computer Networks edited by
279 views
3 votes
3 votes
A message bit stream is $101101101$, the bit pattern will be  if message is transmitted with bit stuffing and a flag bit of $0111$___________
in Computer Networks edited by
by
279 views

4 Comments

please explain again .
0
0

See Kavita,

given Flag is 0111 , now the 0 - Bit  will be  added  after every two consecutive ( like 00 or 11 )  is occured in data

so 101101101 will be stuffed as follows 

    1011 0 011 0 01 

hope it is clear to you.

0
0
Thank you Sir..
0
0

2 Answers

2 votes
2 votes
Best answer

Since Flag is 0111 , bit ( The 0 - Bit ) will be stuffed or added  after every two consecutive ( like 00 or 11 )  is occured in data

so 101101101 will be stuffed as follows 

    1011 0 011 0 01 

4 Comments

actually how is it being identified to add o after consecutive 0's or 1's??
0
0

@A_i_$_h 

if you have flag bits 0111 (then add 0 after every two consecutive 1's),and

if you have flag bits 1000 (then add 1 after every two consecutive 0's).

3
3

01111011001100010111 is what I got, why are we not adding flag bits to both ends of the transmitted message.
@Bikram

0
0
7 votes
7 votes

Flag is 0111

So, whenever data will contain 0111, the sender will stuff a 0 before the last one, 01101.

Now, whenever the receiver sees 0110x..., it will remove that stuffed 0 interpreting it as 011x...

Now, you might think that the message 101101101 should be sent as it is because there is no flag inside the data.

But, look what will happen when receiver will receive this message.

1 0111101

Receiver will remove the bold 0, assuming it to be a stuffed bit (since it comes after 011). And interpret message as 10111101, which is completely wrong!

So, the sender should also stuff a 0 inbetween ...0110..., as ...01100...

So, now sender will send: 10110011001

Receiver will remove those stuffed 0s

Answer:

Related questions