modifying string to bigint

Have just debug this block of code:
picture-1

of this book, and found out that this only works fine for string numbers. It cannot represent all of characters. Characters with the last 4 bits bigger than 10, to be exact.
Like this:
“A” = 65 = 0100 0001 = 1
“B” = 66 = 0100 0010 = 2

“I” = 73 = 0100 1001 = 9
“J” = 74 = 0100 1010 = ???

I think I’m going to find a way to modify this a little bit, because if it works for characters, I don’t have to convert it to numbers manually like I did before.

Advertisements