1. Home >
  2. Apps >
  3. Groups >

Why flag is of 8-bit in the case of bit and byte oriented protocol ?

Question asked by mohit007kumar00 in #Coffee Room on Nov 16, 2010
mohit007kumar00
mohit007kumar00 · Nov 16, 2010
Rank B2 - LEADER
hello friend's,
Just have some read about about character and bit oriented protocol.I seen that flag is added to separate one frame from the next.But i didn't able to find the reason that why the flag is taken to be of 8-bit...?
Can any one tell me the reason....? Posted in: #Coffee Room
alicwilliam
alicwilliam · Nov 18, 2010
Rank E2 - BEGINNER
it depends on your application
Leo
Leo · Nov 18, 2010
Rank B3 - LEADER
Sorry William i doesn't depend on application,
The the 8 bit flag is set to tackle problem of variable size framing. As we know a frame in data link layer may consists of header+trailer along with information about payload, error correction, detection and redundant bits. And they all are in multiple of 8 bits. So it might happen that payload may get mis-undertaken as any other data if matching bits are found so to separate each frame 8 extra bits are flagged on either sides of frame to differentiate it from other frames. A flag consists of start or end of frame and some other details. I hope that was easy explanation.
Guys specially from Networking field please correct if something went wrong.
silverscorpion
silverscorpion · Nov 18, 2010
Rank A3 - PRO
Yes.. Not only flags, but most of the fields in many protocols, like payload length, time to live etc.. are made as 8 bits or a multiple of 8 bits, so that the total no. of bits will be a multiple of 8.
In some protocols, if the payload length is not a multiple of 8, then zeroes are padded to the end to make it a multiple of 8, for the same reason.

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up