how to check binary number in java