Question: Using C programming Write a program that lets a user manipulate bits individually in a 4-byte variable (int). The program should begin with all bits
Using C programming
Write a program that lets a user manipulate bits individually in a 4-byte variable (int). The program should begin with all bits having zero. The program should enter a loop where it prints out current bit values as single integer using the 2's complement model. It should then prompt the user to set a bit, clear a bit, or exit the program. If the user desires to set a bit or clear a bit, it should prompt the user for which bit, change the appropriate value and cycle back to the beginning of the loop. Menu: 1: to set the bit Which bit? 2: to clear the bit Which bit? 3: to print the integer Which bit? 4: exit the program ly) Any other number: to print "invalid choice" and print menu Submit the assignment with following details 1. Statement of the problem (as given above) 2. Program Design (function hierarchy diagram) and program code 3. Compilation results (copy from unix window and paste it to MSWORD file) 4. Show the results (copy from unix window and paste it to MSWORD file) 5. If the program has bugs, show you used debugger and show how you fioxed the program (Get a screen shot and paste it to MSWORD file) 6. Conclusions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
