What I don't understand is how to count the bit position, should I start from 1 or 0?
The bit count always starts at 0
Example:
unsigned int x = 8;
unsigned int y = x >> 0; // Here you are saying shift x by 0 bit times
printf("%d: \n", y);
y = x >> 1; // Here you are saying shift x by 1 bit position to left...
printf("%d: \n", y);
and you know shifting left 1 time means divide by 2. If you are shifting left 0 times means divided by 1 (2 power 0) Hope this message was conveyed to you properly.