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
Consider the definition in OCaml
xenn [34]

Answer:

The type of b is bool ( B )

The type of c is int ( C )

The type of d is int ( D )

Explanation:

The options that must hold zero are: The type of b is bool,The type of d is int and The type of c is int.

If b is true then c or d is true because c and d are int. this is because b been a true/false means that d and c are boolean int. because d and c are assigned to integers  

8 0
3 years ago
Write a function checkPalindrome that accepts a single argument, a string. The function should return true (Boolean) if the stri
Vsevolod [243]

Answer:

Following are the program in the Java Programming Language.

//define function

public static boolean checkPalindrome(String str){

//set integer variable to 0

int a = 0;

//set integer variable to store the length of the string

int n = str.length() - 1;  

//set the while loop to check the variable a is less than the variable n

while(a<n)

{

//check the string character is not in the variable n

if(str.charAt(a)!= str.charAt(n))

//then, return false

return false;  

//the variable a is incremented by 1

a++;

//the variable n is decremented by 1

n--;

}

//and return true

return true;

}

Explanation:

<u>Following are the description of the following function</u>.

  • Firstly, we define boolean type public function that is 'checkPalindrome' and pass string data type argument 'str' in its parameter.
  • Set two integer data type variables that are 'a' initialize to 0 and 'n' which store the length of the string variable 'str' decremented by 1.
  • Set the While loop that checks the variable 'a' is less than the variable 'n', then we set the If conditional statement to check that the string character is not in the variable n then, return false.
  • Otherwise, it returns true.
5 0
4 years ago
Tracking a basketball's backspin with an internal sensor can...
valkas [14]
Help a player improve one part of this shooting technique
5 0
3 years ago
You work as an IT Technician for uCertify Inc. David, a user, has recently purchased a laptop computer. He is now complaining th
olganol [36]

Answer:

Check the hardware switch on the wireless antenna card that activates the service.

Explanation:

The person works for uCertify Inc as an IT Technician. David, a regular, has just buy a laptop. He still says that he will not link to a wireless connection, although his laptop seems to have an inner wireless app. So, by checking the hardware switch on the wireless antenna card that activates the service, that person resolves the issue.

7 0
3 years ago
How do Humza's videos counter hate speech and xenophobia
o-na [289]

Humza's videos counter hate speech and xenophobia as he doesn't let the negativity get to him, he tries and succeeds to make positive changes for unity.

<h3>What is xenophobia?</h3>

The fear or hate of everything that is viewed as being alien or weird is known as xenophobia. It is a manifestation of perceived conflict between an ingroup and an outgroup and may take the form of mistrust of one another's actions, a wish to have them removed, or concern over losing one's ethnic, racial, or national identity.

Simply described, xenophobia is the fear or dislike of strangers or foreigners; it manifests itself in prejudiced attitudes and behaviors and frequently ends in violence, abuse of any kind, and displays of hatred. In this case, it should be noted that he preached love and the importance of being united.

Therefore, Humza's videos counter hate speech and xenophobia as he doesn't let the negativity get to him, he tries and succeeds to make positive changes for unity.

Learn more about xenophobia on:

brainly.com/question/24366668

#SPJ1

8 0
2 years ago
Other questions:
  • When you see a yield sign what do you do?
    8·1 answer
  • Richard Palm is the accounting clerk of Olive Limited. He uses the source documents such as purchase orders, sales invoices and
    12·1 answer
  • Which activity might require you to provide your social security number
    8·2 answers
  • Jasmine is writing a shopping app. She has created a variable to keep track of the number of items in the shopping cart. Every t
    6·1 answer
  • Write a Java program that prints out a 4x4 square (like the one below)
    11·1 answer
  • The InfoBar is located below the ribbon and on top of a message. It is used for which purposes? Check all that apply. showing th
    9·2 answers
  • Copyright ownership analysis starts with this principle: The ________ is the owner.
    6·1 answer
  • Please help it’s timed
    5·1 answer
  • You learned that you can use the tags to insert a link to another webpage. One problem that webpage developers face is that, aft
    7·1 answer
  • What report indicates where users start or exit the conversion funnel?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!