UMBC CMSC 211 |
In the beginning, the were no answers, and anyone could make up the answers they wanted to use. The manufacturers of equipment got together to figure out how to have one ansigure out how to have one answer for everyone, resulting in the American Standard Code for Information Interchange (ASCII). This resulted in 128 possible characters (using seven bits with one more to be used to facilitate communications).
Normally, values zero through thirty-one are non-printable characters. So is the value 127. The space character has the value of 32. Appendix A contains the full set of values.
One of the tricks of the trade is that the character '0' is not the value 0. But since the numbers run consequentively, you can get the binary value of a character by subtracted the value of the character '0'. Thus, '9' - '0' = 9.
Another trick is that you can convert a lowercase letter to a uppercase letter by subtraction and addition: