coding #1 validating that the binary number only has 1 and 0 digits