Playing With Bits

it was showing wrong answer.
but i’ve tried a lot of test cases all of which are showing correct results.https://ide.codingblocks.com/s/217173