Implemented solution for CodeEval's Bit Positions challenge
https://www.codeeval.com/open_challenges/19/