Showing posts with label Invert bits of a number. Show all posts
Showing posts with label Invert bits of a number. Show all posts

Invert bits of a number

Given a non-negative integer n. The problem is to invert the bits of n and print the number obtained after inverting the bits. Note that the actual binary representation of the number is being...