CIS3355:
Business Data Structures |
What is the difference between characters and integers? The simple answer is NONE. As we alluded to in the previous tutorial, ASCII characters are stored as numbers (for example, the number '2' is stored as the number 50; the number '3' is stored as the number 51; the character 'e' is stored as the number 101 (which is the sum of the 'characters' '2' and '3'). Don't forget: ASCII is merely a scheme for representing characters or symbols, ONLY!! --- And --- COMPUTERS ONLY WORK WITH NUMBERS! If we look at the ASCII Table, each of the symbols represented are stored as numeric values: NOTE: For the first quiz, you MUST memorize (there is no other way of doing this) the corresponding decimal values for the ASCII characters:
Why ??? There are two reasons:
Cheer up! You need to memorize only 9 integers. Start now, and you'll be ready for the test! In the table, what is Dec, HX, Oct ?? We will get to HX (Hexadecimal) and Oct (Octal) a little later. However, for the time being, all that we need to know is that each of the ASCII characters represented is stored as an integer (Dec, or Decimal) value. Each decimal (base 10) value can, of course be associated with a binary value, which represents how the 'light switches' in the computer are set. How are numeric values stored?? We're getting to that. Questions you should be able to answer: 1. What is the difference between characters and numeric values?
Answer: c This page was last updated on 05/28/05.
|