1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SOVA2 [1]
3 years ago
9

Program for bit stuffing...?

Computers and Technology
1 answer:
Olegator [25]3 years ago
4 0

Answer: Program for bit stuffing in C

#include<stdio.h>

      int main()

    {    

          int i=0,count=0;

          char data[50];

          printf("Enter the Bits: ");

          scanf("%s",data);            //entering the bits ie. 0,1  

          printf("Data Bits Before Bit Stuffing:%s",databits);

          printf("\nData Bits After Bit stuffing :");

          for(i=0; i<strlen(data); i++)

              {

              if(data[i]=='1')

                     count++;

              else

                     count=0;

                printf("%c",data[i]);

             if(count==4)

                {

                          printf("0");

                          count=0;

                 }

             }

    return 0;

 }

Explanation:

bit stuffing is the insertion of non-information bits during transmission of frames between sender and receiver. In the above program we are stuffing 0 bit after 4 consecutive 1's. So to count the number of 1's we have used a count variable. We have used a char array to store the data bits . We use a for loop to iterate through the data bits to stuff a 0 after 4 consecutive 1's.

You might be interested in
Which term refers to the data stored in computer memory on which the processor applies to program instructions
Fed [463]
The answer is B.) variable.
3 0
2 years ago
What is an border in html
kompoz [17]

Borders can be applied to most HTML elements within the body. To make a border around an element, all you need is border-style . The values can be solid , dotted , dashed , double , groove , ridge , inset and outset . border-width sets the width of the border, most commonly using pixels as a value.

8 0
2 years ago
Write 'T' for true and 'F' for false statements.
asambeis [7]
1-F
2-T
3-F
4-F
5-F
6 T
7-T
3 0
2 years ago
In Microsoft PowerPoint, a _____ gives viewers a visual image of data, such as a line graph or a three-
Vera_Pavlovna [14]

Answer:

graph

Explanation:

I don't know anything else that would be a visual representation of data.

5 0
2 years ago
What is the role of the ieee in computer networking and wireless communications?
steposvetlana [31]
<span>An organization that sets standards for computer networking and wireless communications.</span>
8 0
3 years ago
Other questions:
  • )Dynamically allocate an object of Banana, using the pointer variable daco.
    6·1 answer
  • Elena is used to kissing her friends on both cheeks as a form of greeting in her native country. She notices that her new friend
    6·1 answer
  • Why is it important to ask an interviewer at least one question at the end of an interview?
    12·2 answers
  • If you have a long title for a table and need it to span several cells, you can use A. Merge Cells. B. Split Cells. C. Insert Co
    5·1 answer
  • ______ is using material created by others without obtaining permission from the original authors.
    10·2 answers
  • Create a SavingsAccount class. Use a static data member annualInterestRate to store the annual interest rate for each of the sav
    10·1 answer
  • Tweaking existing technology in a new way is usually called _____. leveraged creativity state-of-the-art breakthrough applicatio
    5·1 answer
  • When creating any digital work, what is the MOST important thing to remember?
    7·1 answer
  • Which privacy protection uses four colors to indicate the expected sharing limitations that are to be applied by recipients of t
    12·1 answer
  • Convert<br> 0.625 to binary
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!