subject

In this lab you will convert an integer to an ASCII string of 1 and o characters representing the 32 individual bits of the integer, from most significant bit to least significant bit. This will require you to use bit manipulations and masking, as well as reinforce the structure of integers. Requirements
You must implement the function bitstring() in bitstring. c. This function accepts an integer and a character pointer, and writes a string of exactly 32 ASCII '1' and 'o' characters followed by a terminating NUL byte to the location beginning at the character pointer, containing the bit representation in the input integer. void bitstring(int32_t in, char *out); The bits of in, from 0 to 31, should be placed into the string out , with bit 31 in out[0] and bit 0 in out[31], followed by a terminating NUL character, with an ASCII '1' character representing a one bit and an ASCII o' character representing a O bit. Thus, the integer 1 would produce the string "00000000000000000000000000000001". Possible Strategies There are two likely strategies for pulling the individual bit values out of an integer:
• Shifting a mask one bit at a time, and applying it to the fixed integer
• Shifting the integer one bit at a time, and applying a fixed mask to it
It is also (because the number of bits in the integer is a fixed constant) possible to process the integer in either most- significant to least-significant bit order, or least-significant to most significant.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:10
Drag each label to the correct location on the imagelist the do’s and don’ts of safeguarding your password.keep yourself loggedin when you leave your computer.don’t write your password down and leave it whereothers can find it.share your password with your friends.each time you visit a website,retain the cookies on your computer.use a long password with mixed characters.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Asecurity policy is a a. set of guidlines b. set of transmission protocols c. written document d. set of rules based on standards and guidelines
Answers: 2
You know the right answer?
In this lab you will convert an integer to an ASCII string of 1 and o characters representing the 32...
Questions
question
History, 04.01.2020 13:31
question
English, 04.01.2020 14:31
Questions on the website: 13722359