Question: Code the following operations in C++. 1. Define an unsigned short integer (either unsigned short int or uint16_t) variable named number (1p) 2. Get the

Code the following operations in C++. 1. Define an unsigned short integer (either unsigned short int or uint16_t) variable named number (1p) 2. Get the value for the number from the user (1p) 3. Print the most significant bit of the number using bitwise operators (3p) 4. Print the least significant bit of number using bitwise operators (3p) 5. Compile your code with the g++ compile statement and run it (g++ bitwiseOp.cpp -o bitwiseOp) (2p) 6. Run your program for 45267 (most significant 1 least significant 1), 25002 (most significant 0 least significant 0), (4pt) 7. Upload your cpp file here. (3pt) 7. Take a screenshot of your code, compile and run statements and outputs together and paste it here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
