For the first version of digit, an argument of ~1 would return the character corresponding to the character code before the character code for "0" and an argument of 10 would return the character code 10 character codes after "0" For the second version of digit, they would cause errors