<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Bit_stuffing</id>
	<title>Bit stuffing - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Bit_stuffing"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Bit_stuffing&amp;action=history"/>
	<updated>2026-04-20T14:45:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Bit_stuffing&amp;diff=26954&amp;oldid=prev</id>
		<title>imported&gt;King1607 at 14:22, 7 November 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Bit_stuffing&amp;diff=26954&amp;oldid=prev"/>
		<updated>2025-11-07T14:22:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Practice in data transfers}}&lt;br /&gt;
{{Use American English|date = March 2019}}&lt;br /&gt;
{{no footnotes|date=March 2013}}&lt;br /&gt;
&lt;br /&gt;
In [[data transmission]] and [[telecommunications]], &amp;#039;&amp;#039;&amp;#039;bit stuffing&amp;#039;&amp;#039;&amp;#039; (also known—uncommonly—as &amp;#039;&amp;#039;&amp;#039;positive justification&amp;#039;&amp;#039;&amp;#039;) is the insertion of non-information [[binary digit|bits]] into [[data]]. Stuffed bits should not be confused with [[overhead bit]]s.&lt;br /&gt;
&lt;br /&gt;
Bit stuffing refers to adding extra bits that do not contain any actual information into the data stream. These stuffed bits are different from overhead bits. Overhead bits are also non-data bits, but they are required for transmission, such as those used in headers, checksums, and other control information.&amp;lt;ref&amp;gt;{{Cite web |date=2018-06-14 |title=Bit Stuffing in Computer Network |url=https://www.geeksforgeeks.org/computer-networks/bit-stuffing-in-computer-network/ |access-date=2025-11-07 |website=GeeksforGeeks |language=en-US}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bit stuffing is used for various purposes, such as for bringing [[bit stream]]s that do not necessarily have the same or rationally related [[bit rate]]s up to a common rate, or to fill [[Buffer (telecommunication)|buffers]] or [[Data frame|frames]]. The location of the stuffing bits is communicated to the receiving end of the [[data link]], where these extra bits are removed to return the bit streams to their original bit rates or form. Bit stuffing may be used to synchronize several channels before [[multiplexing]] or to rate-match two single channels to each other.&lt;br /&gt;
&lt;br /&gt;
Another use of bit stuffing is for [[run length limited]] coding: to limit the number of consecutive bits of the same value in the data to be transmitted. A bit of the opposite value is inserted after the maximum allowed number of consecutive bits. Since this is a general rule the receiver doesn&amp;#039;t need extra information about the location of the stuffing bits in order to do the de-stuffing. This is done to create additional signal transitions to ensure reliable reception or to escape special reserved code words such as frame [[sync sequence]]s when the data happens to contain them. This technique is particularly useful in situations where data frames are transmitted over unreliable channels, such as wireless networks or noisy copper wires.&amp;lt;ref&amp;gt;{{Cite web |title=Understanding Bit Stuffing Program in C: Implementation and Real-World Applications |url=https://www.ccbp.in/blog/articles/bit-stuffing-program-in-c |access-date=2025-11-07 |website=www.ccbp.in |language=en}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
[[File:Bitstuffing en.svg|thumb|Bit stuffing in CAN after five equal bits]]&lt;br /&gt;
&lt;br /&gt;
Bit stuffing does not ensure that the payload is intact (&amp;#039;&amp;#039;i.e.&amp;#039;&amp;#039; not corrupted by transmission errors); it is merely a way of attempting to ensure that the transmission starts and ends at the correct places. [[Error detection and correction]] techniques are used to check the frame for corruption after its delivery and, if necessary, the frame will be re-sent.&lt;br /&gt;
&lt;br /&gt;
==Zero-bit insertion==&lt;br /&gt;
The [[NRZI]] coding scheme transmits a 0 bit as a signal transition, and a 1 bit as no change.  In this case, bit stuffing is most easily described as the insertion of a 0 bit after a long run of 1 bits.&lt;br /&gt;
&lt;br /&gt;
It was popularized by IBM&amp;#039;s [[Synchronous Data Link Control|SDLC]] (later renamed [[HDLC]]), and is also used in Low- and full-speed [[USB]].  &lt;br /&gt;
&lt;br /&gt;
After a long sequence of 1 bits there would be no transitions in the transmitted data, and it would be possible for the transmitter and receiver clocks to lose synchronisation.  By inserting a 0 after five (SDLC) or six (USB) consecutive 1 bits the transmitter guarantees a maximum of six (SDLC) or seven (USB) bit times between transitions. The receiver can synchronise its clock against the transitions to ensure proper data recovery.&lt;br /&gt;
&lt;br /&gt;
In SDLC the transmitted bit sequence &amp;quot;01111110&amp;quot; containing six adjacent 1 bits is the [[High-Level Data Link Control#Synchronous framing|Flag byte]].  Bit stuffing ensures that this pattern can never occur in normal data, so it can be used as a marker for the beginning and end of the frame without any possibility of being confused with normal data.&amp;lt;ref&amp;gt;Kevin R. Fall and W. Richard Stevens, &amp;#039;&amp;#039;TCP/IP Illustrated Volume 1: The Protocols&amp;#039;&amp;#039;, Second Edition,  Addison-Wesley, 2012, Kindle Edition loc 3505&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main disadvantage of bit-stuffing is that the [[code rate]] is unpredictable; it depends on the data being transmitted.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Source: from [[Federal Standard 1037C]] in support of [[MIL-STD-188]]&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Consistent Overhead Byte Stuffing]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Line codes]]&lt;br /&gt;
[[Category:Synchronization]]&lt;/div&gt;</summary>
		<author><name>imported&gt;King1607</name></author>
	</entry>
</feed>