Given an integer, how do I strip the leading zeroes off its binary representation?
I am using bit-wise operators to manipulate its binary representation. I am trying to see if an integer is a palindrome in its binary representation. I know there are different solutions out there but I wanted to compare the first and last bit, second and last but one bit and so on. So, I was wondering how to strip those leading 0's for this int.