3. ASCII continued
In ASCII every character is represented by a binary number, e.g:
0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
.
The 8 bit ASCII code below represents the upper case letter A:
0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
The 8 bit ASCII code below represents the lower case letter a:
0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |
If you wanted to represent the word JOHN in ASCII, it would look like this:
01001010 01001111 01001000 01001110
The word JOHN would take 4 bytes of memory to store (1 byte per character).
Since computer architecture is built around the byte (which has 8 bits) the 7-bit ASCII table is a little inconvenient.
So ASCII characters are padded out to 8 bits, with the first bit always set to 0. This makes memory management a little easier.
There is, however, an extension to ASCII, called "Extended ASCII", that makes use of this spare digit to fit in another 128 characters commonly used in other languages.
Challenge see if you can find out one extra fact on this topic that we haven't already told you
Click on this link: What is ASCII