[SOLVED] SOLVED:Lab Task 6 Solution

29.99 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon LabTask6.zip (2.7 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (2 votes)

This program already has a macro that determines whether or not an
unsigned int is odd by examining the least significant binary digit.
It is missing the macros for determining if the Nth least significant bit
is set (counting N from the least significant bit, starting from 0),
and for determining if all bits are on in a range of positions.

You must add those macros (5.0%)

A couple of sample runs are …

BitOps
Enter an integer : 31
31 is odd
Enter an integer and a bit number : 31 3
31 has bit 3 on
Enter an integer, start and end bit numbers : 31 2 4
31 has all those bits on

BitOps
Enter an integer : 30
30 is even
Enter an integer and a bit number : 30 6
30 has bit 6 off
Enter an integer, start and end bit numbers : 30 4 6
30 has not all those bits on
(7.0%)

  • LabTask6.zip