I tried your solution SirNot and makes a lot of sense ORing the 3 different conditions. I am passing in signed ints to begin with for the low and high bits so casting the (high + ~low + 1) to a...
Type: Posts; User: V878
I tried your solution SirNot and makes a lot of sense ORing the 3 different conditions. I am passing in signed ints to begin with for the low and high bits so casting the (high + ~low + 1) to a...
I'll try to clarify on the directions. Since the function doesn't pass in an int to bit manipulate, I believe we initially start off with an int set to all 0;s; 32 0's since this code is expected to...
I had a problem writing the following function:
/*
* bitMask - Generate a mask consisting of all 1's
* lowbit and highbit
* Examples: bitMask(5,3) = 0x38
* Assume 0 <= lowbit <= 31,...