All of you EE / IT / CS people. I need your help!

2Xtreme21

Diamond Member
Jun 13, 2004
7,044
0
0
While this is homework, I'm coming to all of you as a last resort. Is someone able to explain to me the concept of bit stuffing? I know it is adding 0's after 5 1's in a row, but one of these problems I have is stumping me, and it shouldn't be.

The stream to be sent is 0111101111101111110. The question asks what is the resulting bit stream that the transmitter should send if bit stuffing is to be used to guarantee the correct transmission?

Isn't it already stuffed as much as it can be since there's no where that more than 5 1's isn't followed by a 0 (except with the last "string" of 6, but that is the end flag, correct?)?

If anyone that knows how to do this can spare a few seconds and tell me if I'm on the right track or not, I'd very much appreciate it.
 

Oscar1613

Golden Member
Jan 31, 2001
1,424
0
0
Originally posted by: 2Xtreme21
While this is homework, I'm coming to all of you as a last resort. Is someone able to explain to me the concept of bit stuffing? I know it is adding 0's after 5 1's in a row, but one of these problems I have is stumping me, and it shouldn't be.

The stream to be sent is 0111101111101111110. The question asks what is the resulting bit stream that the transmitter should send if bit stuffing is to be used to guarantee the correct transmission?

Isn't it already stuffed as much as it can be since there's no where that more than 5 1's isn't followed by a 0 (except with the last "string" of 6, but that is the end flag, correct?)?

If anyone that knows how to do this can spare a few seconds and tell me if I'm on the right track or not, I'd very much appreciate it.

if the protocol in the question is to insert a zero after 5 or more 1s (as opposed to more than 5 1s), then you need to insert an additional 0 after the string of 5 1s, because that 0 in there already is part of the stream, and if you didnt insert another 0, the receiver would discard that 0.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Doesn't bit stuffing add a 0 after 5 1's regardless of what's in the 6th position? Because what if I want to transmit:

...0111110...

If the receiver takes that signal as is how will it know if that 0 following the 5 1's is a bit stuffed zero or not. It'll make the mistake of reading it as ...0111111...

So to make sure they don't have this situation, the sender will always stuff a 0 after 5 1's regardless of what's in the 6th position.

As for the end frame question, I would have to guess that you don't assume the last set is the end SFF and assume this is the actual data stream that wants to be transmitted.
 

luv2liv

Diamond Member
Dec 27, 2001
3,502
94
91
omg, i should know this!
but working in the real world, with sprint, never had to know this stuffs. thank god!
 

2Xtreme21

Diamond Member
Jun 13, 2004
7,044
0
0
Thank you very much for your help guys. I was screwing up in assuming the receiver discards all 0's.

Now I need to do this sliding window flow control problem and I'll be good to go. (I have no idea what sliding window flow control is.)

:( Maybe I'm not cut out for this field.