View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12933 Members
Join this group to post and comment.

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

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....?
alicwilliam
alicwilliam • Nov 18, 2010
it depends on your application
Leo
Leo • Nov 18, 2010
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
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.

Share this content on your social channels -