subject

This daily will allow you to practice more with the bit wise operators and shifts. Consider the following modification of the main program from daily 3 include
void setflag(unsigned int' flag_holder, int flag position);
void unset flag(unsigned intflag holder, int flag position);
int check flag(unsigned int flag holder, int flag_position);
void display 32 flags (unsigned int flag holder);
int main(int argc, char* argv[])
unsigned int flag holder-e;
set flag(&flag holder, 3)
set flag(&flag holder, 16):
set flag(&flag holder, 31):
display 32 flags (flag holder);
unset flag(&flag_ holder, 31);
unset flag(&flag_ holder, 3);
set flag(&Flag holder, 9)
display 32 flags (flag holder);
return ;
Write the code for the definition of unset flag and display 32 flags so that the output of your program looks like the following:
You can think of the unset flag function as taking an integer and making sure that the n bit is a 0. You may find the operator useful. It is used to "flip the bits" of a number making all the zero values 1's and all the 1's zeroes. As in the previous daily, the shifting operators and the bitwise and (&) and or () may also be useful. If you are doing multiplication or division then you are doing it wrong. The display 32 flags function should just print the information to the screen as was given in the previous assignment Gust turn it into a function instead).

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
How to apply the fly in effect to objects on a slide
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 24.06.2019 07:20
3pointsyou've found an image you want to insert into your slide presentation. youwant to make the image look more gray so that it looks like an older imagewhat would you need to adjust? 0.00o a. sizeo b. hueo c. contrasto d. tones
Answers: 2
You know the right answer?
This daily will allow you to practice more with the bit wise operators and shifts. Consider the foll...
Questions
question
Computers and Technology, 03.11.2020 22:00
question
Mathematics, 03.11.2020 22:00
question
Mathematics, 03.11.2020 22:00
Questions on the website: 13722363