Skip to main content

0.2 ASCII and Generalizations

Now, that we know how numbers are stored in a Computer let’s ask ourselves another questions. How are Digits of the Alphabet(A,B,C,D,E,F,G,H,I,J,K,L……) represented on a Computer.

Computers can’t store anything more than numbers, thus if we want to store Characters on a Computer, the characters need to be converted to a number.

This is done by ASCII, or American Standard Code for Information Interchange.

In ASCII, we represent various characters ranging from Uppercase and Lowercase Alphabets to Dashes, and many other othings.

In ASCII, the characters are named from 0 to 255 and thus is stored as an 8-bit Binary.

The ASCII encoding of various Characters could be found in the following table:



Don’t Worry, you don’t have to memorize any of this, because most of the times when you program you won’t need this table and even when you do you’ll provided access to such a table and tons of other forms of documentation as well.

Similarly,

Colors are encoded in a Computer as well, In the RGB Scheme,


The Degree of Redness, Greenness and Blueness of any color is defined as a number between 0 and 255 and stored as a 255 bit integer, this number then enables the Computer to display that color.

Comments