Home

bitstuffing

Bit stuffing is a technique used in data communications to insert non-information bits into a data stream to ensure synchronization and delimitation of frames. It is employed in certain synchronous protocols and some bus standards.

Mechanism: After a run of five consecutive bits of the same value (either five 1s or five

This method helps maintain clock recovery and prevents false frame boundaries, especially with fixed flag sequences

Common implementations: bit stuffing is used in HDLC and PPP frame formats, and in CAN bus communications,

Limitations and notes: bit stuffing adds overhead, since stuffed bits are not part of the user payload;

0s),
the
transmitter
inserts
a
bit
of
the
opposite
value.
The
result
is
that
no
more
than
five
identical
bits
occur
in
succession
in
the
transmitted
stream.
The
receiver
monitors
the
incoming
bits,
and
when
it
detects
five
consecutive
bits
of
the
same
value,
it
discards
the
next
bit
(the
stuffed
one)
and
continues
processing
from
the
following
bit.
used
in
framing
schemes
such
as
the
HDLC
flag
01111110.
By
breaking
long
runs
of
identical
bits,
bit
stuffing
reduces
the
chance
that
data
appears
to
begin
or
end
a
frame
at
the
wrong
point.
among
others.
it
requires
careful
handling
by
both
transmitter
and
receiver;
the
rules
are
defined
per
protocol,
and
errors
in
stuffing
can
complicate
synchronization
or
error
detection.