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
A(n) ____ is a web-based repository of information that anyone can access, contribute to, or modify.
IgorLugansk [536]

Wiki exists as a web-based repository of information that anyone can access, contribute to, or alter.

<h3>What is a wiki?</h3>

A wiki exists as a combined tool that authorizes students to donate and change one or more additional pages of course-connected materials. Wikis exist as collaborative in nature and promote community-building within a course. Essentially, a wiki exists as a web page with an open-editing system.

A wiki exists as a website or online resource that can be revised by multiple users. Some wikis, such as Wikipedia, exist publicly accessible. Others exist utilized by associations to manage data in-house, allowing teams to efficiently share knowledge and work together better effectively.

A wiki exists on a Web site that authorizes users to add and update content on the site utilizing their own Web browser. This exists created probable by Wiki software that operates on the Web server. Wikis finish up being driven mainly by a combined effort of the area visitors.

To learn more about wiki refer to:

brainly.com/question/25153373

#SPJ4

5 0
2 years ago
The Brinley website will not let me search for questions anymore. It says “Search all you want in-app” and then covers the quest
ira [324]

Answer: U can answer a few questions of other people’s questions then the question that was covered it unlocks after answering some questions and u will be able to see it or u could get the app too and it doesn’t block at all

Explanation:

4 0
3 years ago
Create a program that allows the user to pick and enter a low and a high number. Your program should generate 10 random numbers
Natalka [10]

Answer:

import java.util.Scanner;

import java.util.Arrays;

import java.util.Random;

public class Main {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   System.out.print("Enter low: ");

   int low = scan.nextInt();

   System.out.print("Enter high: ");

   int high  = scan.nextInt();

   scan.close();

   int rndnumbers[] = new int[10];

   Random r = new Random();

   for(int i=0; i<rndnumbers.length; i++) {

     rndnumbers[i] = r.nextInt(high-low+1) + low;

   }

   for(int i=0; i<rndnumbers.length; i++) {

     System.out.printf("%d: %d\n", i, rndnumbers[i]);

   }

 }

}

4 0
3 years ago
Add (total) all the number in the list (below) using a for loop, but skip over the number at index 3.
user100 [1]

Answer:

The program in Python is as follows:

numbers = [10,20,30,40,50,60,100]

total = 0

for i in range(len(numbers)):

   if i != 3:

       total+=numbers[i]

print(total)

Explanation:

This initializes the list

numbers = [10,20,30,40,50,60,100]

Set total to 0

total = 0

This iterates through numbers

for i in range(len(numbers)):

This ensures that the index 3, are not added

<em>    if i != 3:</em>

<em>        total+=numbers[i]</em>

Print the calculated sum

print(total)

3 0
3 years ago
What are the data types in access​
Julli [10]

Answer:

Data type in Microsoft Access Database

Text  

Memo  

Byte  

Integer

Long  

Single  

Double  

Currency  

AutoNumber  

Date/Time  

Yes/No  

Ole Object  

Hyperlink  

Lookup Wizard

Explanation:

4 0
3 years ago
Other questions:
  • The first step in creating photographs with good backgrounds is which of the following? Learning to see the background before ta
    11·2 answers
  • What are the different components of the cloud architecture?
    5·2 answers
  • What is the purpose of a scatter plot introduction to computer applications
    6·2 answers
  • Which of the following is not a type of user account? A. Administrator b. Guest c. Group d. Standard
    10·1 answer
  • Someone who is young, lacks funds, and really wants to gain technical skills while serving his or her nation should consider
    8·1 answer
  • What are the different ways to represent compounds? Check all that apply. a structural formula a ball model a space-filling mode
    13·2 answers
  • What is the "online disinhibition effect"?​
    7·1 answer
  • Today's Apple Mac computers run with the same internal hardware as the Windows-based PC.
    10·2 answers
  • Given an array a, write an expression that refers to the first element of the array .
    5·1 answer
  • Write 3 things that can't be done without technology. write your opinion?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!