I am trying to do assignment: \"Find the number of bits in an unsigned integer data type without using the sizeof() function.\"
And my design is to convert the integ
x & 1 is equivalent to x % 2.
x & 1
x % 2
x >> 1 is equivalent to x / 2
x >> 1
x / 2
So, these things are basically the result and remainder of divide by two.