teach-ict.com logo

THE education site for computer science and ICT

Characters

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.