bit manipulation: palindromes in base 2 and 10