The Gateway to Computer Science Excellence
+2 votes

in Computer Networks by
retagged by | 201 views
mi quest  is when to stuffed after 3 consecutive or take   everytime five consecutive 1..
after every 2 consicutive 1

1 Answer

+2 votes
Best answer

Data Frame: 1011101111011111110

Stuff bit pattern : 01110

We will insert 0 after every two consecutive 1's

So the final data that has to be transmitted is 1011010110110011011011010

Number of zero stuffed is 6.

selected by
bro why to stuffed after two  ....not three
Stuff bit pattern or flag is used as start and end delimiter. If this pattern matches with data then receiver will think that it is end of message and will discard further data. So if data contains pattern same as delimiter/flag we change it and we change it by removing that pattern from data. We remove that pattern from by inserting 0 after every 0 followed by n-1 consecutive 1, here it is 011. Here n is number of 1 in flag.
Would we stuff 0 after every two consecutive 1s or after every 011?

Number of zero's Stuffed are 6.

The final bit pattern will be,

1011 0 1011 0 11 0 011 0 11 0 11 0 10.

The given Stuff bit pattern is 01110.

Hence a zero will be stuffed for every occurence of 011.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,345 questions
60,487 answers
95,294 users