How a computer stores letters
A computer stores only numbers, so every character has a number in a code table. In ASCII, a table with 7 bits, so 128 codes, the capital letter A is 65, B is 66 and so on; the small letter a is 97, the digit character 0 is 48 and the space is 32. A byte has 256 values, but ASCII uses only 128 of them. Note that the character 7 has code 55, while the number 7 is stored as 0000 0111: the character and the number are different things. ASCII has no Arabic letters, so people made other tables, and the same number meant different characters in different tables. If a text written with one table is opened with another, you see garbled text. Unicode solves this: it is one table that gives a number to the characters of all scripts, including Arabic, so a text can mix languages. For example, the Arabic letter alef is 0627 in hex, which is 1575 in decimal. A font is only the look of the character, its shape and style; changing the font never changes the code. Remember: the code says which character, the font says how it looks.
| A | B | C | |
|---|---|---|---|
| 1 | Character | Code (decimal) | Code (7 bits) |
| 2 | A | 65 | 1000001 |
| 3 | B | 66 | 1000010 |
| 4 | C | 67 | 1000011 |
| 5 | a | 97 | 1100001 |
| 6 | 0 | 48 | 0110000 |
| 7 | space | 32 | 0100000 |
| Step | What happens |
|---|---|
| writer | saves the text with table 1 |
| reader | opens it with table 2 |
| result | same numbers, other characters: garbled text |
Write your first name in capital Latin letters, then write the code of each letter, counting from A = 65. Then write the same codes in binary with 7 bits. Do not use anyone else’s name.