Frame Format: A B ESC FLAG
a. in Byte count method the number of bytes in a frame is mentioned in the beginning of a frame
Format=00000100 01000111 11100011 11100000 01111110
the first Byte has binary value=4 which indicates that next 4 bytes are part of current frame
b. Flag Byte will be inserted at the beginning and end of frame. also escape byte will be inserted before escape and flag bytes occurring in the data part of the frame
Format=FLAG A B ESC ESC ESC FLAG FLAG
=01111110 01000111 11100011 11100000 11100000 11100000 11100000 01111110 01111110
c. flag bytes are inserted at the beginning and of frame along with bit stuffing
01111110 01000111 11100011 11100000 011111010 01111110