Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C programming language !!! This assignment will allow you to practice more with the bit wise operatons and shifts. Consider the following modification of the

C programming language !!! image text in transcribed
This assignment will allow you to practice more with the bit wise operatons and shifts. Consider the following modification of the micin program froan HW3: \#include void set-flag (unsigned int * flag-holder, int flag-position): void unset-flag (unsigned int = flag-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 arge, char: argv []) \{ unsigned int flag-holder =0 set-flag (\&flag-holder , 3); set-flag (kflag-holder, 16); set-flag (\&flag-holder, 31): display-32-flags (flag-holder): unset-flag (\&flag-holder, 31); unset-flag (\&flag-holder , 3); set-flag (R-flag-holder, 9); display-32-flags (flag-holder): return 0 ; \} Write the code for the definition of set. Alag and check flag so that the output of your program looks like the following: 10000000000000010000000000001000 00000000000000010000001000000000 You can think of the unset.flag function as taking an integer and making sure that the nth bit is a 0 . You may finde the operator useful. It is used to "flip the bits" of a mumber making all the zero values. 1 's and all the 1's zeroes. As in the previous assignment, the shifting operators and the bitwise and ( se ) and or (| ) may atso 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 sereen as was given in the previous assignment (just turn it into a function instead). At the top of your code you should have a comment section that has the following format: Author: Date: Effort: Time you spent on this project> Purpose

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

List the variable overhead variances and briefly describe each.

Answered: 1 week ago