Objectives

Students will be able to:

  • Understand how and why a computer represents text and the use of character sets, including American standard code for information interchange (ASCII) and Unicode
  • Understand how and why a computer represents sound, including the effects of the sample rate and sample resolution
  • Understand how and why a computer represents an image, including the effects of the resolution and colour depth

Text, Sound & Images

 

There are so many different types of digital files.

here are just a few...
File extension Use
.txt text file
.rtf text file
.pdf text file
.csv text file
.mp3 audio file
.mid audio file
.wav audio file
.bmp image file
.svg image file
.jpg image file
.mp4 video file

   Text

Computers store text in a binary format. One byte of information is used to represent one character. A standardised format is used. It is called ASCII. Here it is:

Images

And how about images? Images are displayed on computer screens as a set of pixels - picture elements.

 

Each pixel has an associated color. The number of bits required to encode the color information is known as the bit depth of the image.

If 1 byte (8 bits) of information was used to represent a color, then there would be 28 possible color combinations, which is 256.

The resolution of an image is just the number of pixels used to make the image. The above image has a resolution of 30x30, or 900 pixels.

So, to improve the quality of an image, increase its resolution and/or its bit depth!

Use simulator to get an idea of how computers store color information for each pixel in an image. Simply zoom in and out.

What bit depth does this simulator use?

Sound

Sound waves are analogue in nature. Our ears can help process these natural waves of energy. But a computer doesn't have ears! It doesn't understand analogue sound waves (analogue data).

We need to convert the analogue data into digital data.

This is done by taking samples of the analogue sound wave and converting the data into a digital value:

 

Digital systems sample audio waves. The more samples we store, the better the quality of the digital file.

In this example, 8 bits (binary digits) are used to store each sample. This is known as the bit depth.

The more samples we take, the better the quality of the digital audio file more info here.

Also, the greater the bit depth, the better the quality of the digital audio.

This sound file will contain:

1111111101001101000000000100110111111111

.mp3 files sampled at a different rate:

This audio file was sampled at 6000 samples per second.

The bit depth is 8.

This means that 8 bits are used to store each sample.

 

This audio file was sampled at 48000 samples per second.

The bit depth is 32.

This means that 32 bits are used to store each sample.

Fun fact

A common sampling rate is 44 khz - this means 44000 samples per second. With so many digital samples, the digital audio quality will be very good.

Task

Complete the Worksheet. Refer back to this page if you need to review the information.

SUBSCRIBE

Join my mailing list to receive updates on the latest blog posts and other things.