We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Networking

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is Bit Stuffing?

By Jessica Reed
Updated: May 17, 2024
Views: 9,996
Share

Bit stuffing, occasionally referred to as positive justification, is the process of adding in extra, non-data information into a string of computer data, typically to ensure that the data is read properly when the computer receives it. Computer data is made of bits of information in the form of 1's and 0's. To signal the beginning and the end of a data chunk, a code is used. When actual information being transmitted might be confused for this code and ignored, extra bits, such as 0's, are inserted — stuffed — into the code so the computer knows what data to process.

Also known as bit padding, bit stuffing helps prevent errors when a computer receives information. The bits do not represent any actual information and once all the data is transmitted, the computer deletes or ignores the unnecessary bits. If, for example, the signal for the beginning of a line of code was five 1's in a row and the actual data being sent started with five 1's, the computer would think this was the start signal and delete it. To prevent this, a zero bit would be inserted in between the fourth and fifth 1's so it would read as "111101" instead of "11111." The computer would then delete the zero and read the data as five ones instead of deleting it.

Another use for bit stuffing is to fill out a string of data that requires a certain number of bits to transmit properly. A string of information might need to be at least 10 bits long but have only nine present. In this situation, an extra bit would be added to bring the total to 10. The extra bit will be discarded when the data is interpreted.

Aside from helping the computer interpret chunks of data properly, bit stuffing is also used to help computer synchronization. A computer sends and receives information in a steady rhythm based on its internal clock. If too many of the same bits — a line of all 0's for example — are sent at once, the computer clock may get out of sync and execute the commands in the wrong order. Inserting a 1 into the line of 0's forces the computer clock to re-sync itself and prevents this problem.

Similar to helping a computer stay in sync, bit stuffing also helps the computer read data correctly when the information is sent in bits instead of as a continuous stream. To trick the computer into seeing the transmission as continuous, random bits are generated and sent to the computer while it waits for the next actual chunk of information to be transmitted. This keeps the transmission pattern at a consistent pace.

The computer knows to remove non-data bits from data streams once they are received. Computer programmers need to know which bits to stuff so the computer will remove them instead of reading them as actual data. If the computer tried to interpret these stuffed bits instead of discarding them, it would cause computer errors in the program.

Share
WiseGeek is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.

Editors' Picks

Discussion Comments
Share
https://www.wisegeek.net/what-is-bit-stuffing.htm
Copy this link
WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.