成人快手

Representing text, images and soundRepresenting data

Learn how text, images and sound are converted into binary so they can be processed by a computer and how images and sound are compressed to create smaller files.

Part of Computer ScienceData representation

Representing data

All data inside a computer is transmitted as a series of electrical signals that are either on or off. Therefore, in order for a computer to be able to process any kind of data, including text, images and sound, they must be converted into form. If the data is not converted into binary 鈥 a series of 1s and 0s 鈥 the computer will simply not understand it or be able to process it.

Before a computer can understand any information, it must first be converted into binary. Audio, video, images or written text must be converted from their original formats into binary code.

Representing text

When any key on a keyboard is pressed, it needs to be converted into a binary number so that it can be processed by the computer and the typed character can appear on the screen.

The letter "A" on a keyboard converts to 01000001 in binary

A code where each number represents a character can be used to convert text into binary. One code we can use for this is called . The ASCII code takes each character on the keyboard and assigns it a binary number. For example:

  • the letter 鈥榓鈥 has the binary number 0110 0001 (this is the denary number 97)
  • the letter 鈥榖鈥 has the binary number 0110 0010 (this is the denary number 98)
  • the letter 鈥榗鈥 has the binary number 0110 0011 (this is the denary number 99)

Text characters start at number 0 in the ASCII code, but this covers special characters including punctuation, the return key and control characters as well as the number keys, capital letters and lower case letters.

ASCII code can only store 128 characters, which is enough for most words in English but not enough for other languages. If you want to use accents in European languages or larger alphabets such as Cyrillic (the Russian alphabet) and Chinese Mandarin then more characters are needed. Therefore another code, called , was created. This meant that computers could be used by people using different languages.

More guides on this topic