Write a program in c that lets a user manipulate bits


Problem:

Question 1: Prove that an integer p is odd if and only if p 5 is odd. Now prove that the fifth root of 2 is irrational.

Question 2: Write a program in C that lets a user manipulate bits individually in a 4-byte variable. The program should begin with all bits having a value of zero. The program should enter a loop where it prints out the current bit values as a single integer using the two's complement bit model. It should then prompt the user to set a bit, clear a bit, or exit. If the user desires to set a bit or clear a bit, then the program should prompt the user for which bit, change the appropriate value, and then cycle back to the beginning of the loop. Setting a bit changes its value to 1 regardless of its current value; clearing a bit changes its value to 0 regardless of its current value.

 

Please prove that the fifth root of 2 is irrational.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program in c that lets a user manipulate bits
Reference No:- TGS0892802

Expected delivery within 24 Hours