CS FundamentalsVery hardGATE CS (PYQ pattern)

HDLC-style bit stuffing inserts a 0 after every run of five consecutive 1s in the data. The payload 01111110111110111111001111100111111 (35 bits) is framed. How many bits does the stuffed payload contain (flags not counted)?

  1. A. 41
  2. B. 39
  3. C. 42
  4. D. 40

Correct answer: D. 40

Scan left to right: a 0 is inserted after each run reaching five 1s (and the counter restarts after the inserted 0). 35 + 5 inserted = 40.

More Computer Networks questions

Exams that ask this topic