-2
\$\begingroup\$

I am learning computer architecture and organization. I have the following doubt.

I have read that in bit stuffing a 0 is inserted whenever 6 consecutive 1’s are encountered. However, it may be noted that in some other bit stuffing systems, a 0 is inserted after five consecutive 1’s are encountered.

So if a question comes like - If we apply bit stuffing on the bit stream 100011111110011111101, the output bit stream will be:" Should I do bit stuffing after 6 or 5 consecutive 1's?

Can someone please help me?

Reference:
Week 10: Assignment Solutions question number 8

\$\endgroup\$
7
  • 3
    \$\begingroup\$ What's the context? I am curious why "6 consecutive 1s". There is no such generic definition for bit stuffing I could find. \$\endgroup\$
    – Mitu Raj
    May 9 '21 at 13:27
  • 4
    \$\begingroup\$ It depends on what standard you're going by. \$\endgroup\$
    – Hearth
    May 9 '21 at 13:31
  • 2
    \$\begingroup\$ Some systems may even stuff after three or four consecutive 1s. It's all a trade off between bandwidth and synchronization needs. \$\endgroup\$
    – Janka
    May 9 '21 at 13:45
  • \$\begingroup\$ SDLC used bit stuffing (insert a logical 1) after 6 consecutive logical 1s for everything within a data frame as the framing symbol is 01111110. Bits are added to prevent a framing symbol being inadvertently added within the frame. \$\endgroup\$ May 9 '21 at 15:14
  • \$\begingroup\$ @PeterSmith Perhaps you did not understood my question my question is - if a question comes like - If we apply bit stuffing on the bit stream 100011111110011111101, the output bit stream will be:" Should I do bit stuffing after 6 or 5 consecutive 1's? \$\endgroup\$ May 9 '21 at 15:20
4
\$\begingroup\$

Bit stuffing is done according to the standard at hand.

In this case, you are asked to do bit stuffing where the bit-stuffing rule is not given, but it is in the context of a multiple-choice question. So the problem becomes not one of engineering, but in second-guessing the teacher.

In an ideal world, you ask the instructor to clarify the question. That doesn't always work. If you can't do that, then -- you second-guess the teacher.

From the context of the question and the possible answers it appears that bit-stuffing is supposed to happen after six consecutive ones -- there's no answer to choose from where bit-stuffing happens after five consecutive ones. So, run with that.

As noted, in an actual practical project, you're either given a standard that specifies when and how bit-stuffing is to be performed. In a few cases you're designing a standard and you specify (or more likely a committee that you're on, after much argument, specifies) when and how bit-stuffing is to be performed.

\$\endgroup\$
2
  • \$\begingroup\$ "there's no example given where bit-stuffing happens after five consecutive ones", I think you mean "there's no option given where bit-stuffing happens after five consecutive ones". Am I right? \$\endgroup\$ May 9 '21 at 18:24
  • \$\begingroup\$ Edited! I don't know if it's better, but it's different now! \$\endgroup\$
    – TimWescott
    May 10 '21 at 14:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.