title: bit stuffing example
body: <p>I'm going over an example that reads</p>
  
  <blockquote>
    <p>Bit Stuffing. Suppose the following bit string is received by the data link layer from the network layer: 01110111101111101111110.
    What is the resulting string after bit stuffing? Bold each bit that has been added.</p>
  </blockquote>
  
  <p>Answer:</p>
  
  <pre><code>0111011110111110011111010
                 ^      ^  
  </code></pre>
  
  <p>How is this answer reached? My understanding is that bit stuffing works by inserting a certain sequence of bits (known as a flag value) at the beginning and end of a frame. What I don't get is:</p>
  
  <ol>
  <li>We aren't told the flag value!</li>
  <li>We aren't told how big a frame is, so how do we know where to put the flag?</li>
  </ol>
  
  <p><strong>Aditional Information:</strong> I think this network is Ethernet.</p>
  
  <p><strong>Aditional Information 2:</strong> The bit flag is <code>01111110</code></p>
  
  <p>Honestly I think I understand but isn't the answer incomplete because they didn't add the flag 01111110 to the end or beginging? They just took care of when that pattern of bits appeared in the message.</p>
  
  <p>Other example: <a href="http://books.google.ca/books?id=L3Leb1RcwJAC&amp;pg=PA185&amp;lpg=PA185&amp;dq=ethernet%20framing%20bit%20stuffing&amp;source=bl&amp;ots=2_HJ8CHv4g&amp;sig=9fWqMpwCbX5vHEhhnND30s9SHvs&amp;hl=en&amp;sa=X&amp;ei=6ExtUKfEEOrrigKyzoDgCg&amp;ved=0CCEQ6AEwAA#v=onepage&amp;q=ethernet%20framing%20bit%20stuffing&amp;f=false">here</a> they do it too.</p>