Find Digits and Maximizing XOR