0

In framing for the HDLC protocol, assume the receiver receives the following string of bits:

[…] 011111010 […]

How can it realize whether the sequence “011111010” is real data, or the result of a bit stuffing operation from an original flag-like sequence “ 01111110”?

1
  • Has any answer solved your question? Then please accept it or your question will keep popping up here forever. Please also consider voting for useful answers.
    – Zac67
    Commented Nov 16, 2023 at 8:47

1 Answer 1

0

Bit stuffing is used in synchronous HDLC when five consecutive 1 of user data have been transmitted. A 0 is inserted to prevent more than five 1 - even if a 0 was following anyway.

The receiver needs to remove a stuffed 0 after five 1, not after four like in your example (before editing).

Since you've edited your question to include five consecutive 1 now: yes, there's a stuffed 0, the user data is […] 01111110 […]

If six 1 are received it's a frame delimiter (flag) .

2
  • Sorry, my mistake. Indeed, the sequence I wanted to use is "011111010." Indeed, after receiving sequence "011111010," the receiver may think that the intermediate 0 is the result of bit-stuffing, so it reverts sequence "01111110" which is NOT interpreted as a flag but as real data. My question is: what if "011111010" is already my real data? How should I force the receiver not to "remove" the intermediate 0?
    – mgiordi
    Commented Oct 17, 2023 at 7:16
  • After 11111 there's always a 0 inserted, so 111110 becomes 1111100. 011111010 becomes 0111110010.
    – Zac67
    Commented Oct 17, 2023 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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