What is bit stuffing?
Bit stuffing is the process of inserting non-informational bits into data to break up bit patterns in order to affect the synchronous transmission of information. It is widely used in network and communication protocols where bit stuffing is a necessary part of the transmission process. Bit stuffing is usually used to bring bit streams to a common transmission rate or to fill frames. Bit stuffing is also used for run-length-limited coding.
In order to fill bit frames, the position at which the new bits are filled is transmitted to the receiving end of the data link. The receiver removes the extra bits in order to return the bitstreams to their original bit rate. This is used when a communication protocol requires a fixed frame size. Bits are inserted to adapt the frame size to the defined frame size.
Bit stuffing also works to limit the number of consecutive bits of the same value contained in the transmitted data for run-length encoding. This procedure contains a bit of the opposite value after the maximum permitted number of consecutive bits of the same value. For example, if a number of zero bits are sent in succession, the receiving end will lose synchronization because a lot of time has passed without measuring voltage.
Using bit stuffing, sets of bits starting with the number one are stuffed into streams of zeros at certain intervals. The receiver does not need any additional information regarding the bit position if the additional bits are removed. Bit stuffing of this kind is carried out to ensure reliable data transmission and to ensure that transmissions start and end in the right places, among other things.