Hi
I'd like to check if a binary number has a '0' or a '1' at a specific position.
example:
if the binary number is: 101000100
- checking at position zero (that is at the rightmost '0') should result in '0'.
- checking at position 2 should result in '1'.
- checking at position 3 should result in '0'.
checking at position 6 should result in '1'.
etc...
I'm coding in C, so obviously I could use sprintf / scanf and the likes, but I guess there must be something better (read: more time efficient / easier)!
What would be a good mechanism to do this?