0% found this document useful (0 votes)
4 views13 pages

1.2 Text, Sound and Images

The document provides an overview of text, sound, and image representation in computers, detailing character sets like ASCII and Unicode, and their differences. It explains sound representation through sampling and conversion between analogue and digital formats, including key terms like sample rate and resolution. Additionally, it covers image representation, including concepts like pixels, resolution, and colour depth, along with exercises to reinforce understanding.

Uploaded by

a34974831
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

1.2 Text, Sound and Images

The document provides an overview of text, sound, and image representation in computers, detailing character sets like ASCII and Unicode, and their differences. It explains sound representation through sampling and conversion between analogue and digital formats, including key terms like sample rate and resolution. Additionally, it covers image representation, including concepts like pixels, resolution, and colour depth, along with exercises to reinforce understanding.

Uploaded by

a34974831
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

1.2 Text, Sound and Images

Text

- Computers make use of character sets to represent text.

- Common file formats: .txt, .docx and .pdf.

Character Set

- It refers to the symbols that a computer uses.

- It is a list of characters recognised by the computer hardware and software.

- Each character is represented by a unique binary value.

Types of Character Sets

There are 2 types of character sets:

1) ASCII

2) Unicode

ASCII / Extended ASCII

- It stands for American Standard Code for Information Interchange.

- Each character is represented using 7 / 8 bits.

- 128 (27) / 256 (28) characters can be represented.

- It has a smaller range of characters and symbols than Unicode.

- It is a subset of Unicode.

- The character set is not standardized. Hence, characters may be different codes in different systems.

Unicode

- Each character is represented using 2, 3 or 4 bytes.

- 216, 224 or 232 characters can be represented.

- It has a greater range of characters and symbols than ASCII, including different languages and emojis.

- It is a superset of ASCII.

- The character set is standardized. Hence, characters have the same code in different systems.

Page 1 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

Exercises

1. One example of a character set used by computers is ASCII.

Describe how one character is represented in a character set.

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

[2 marks]

2. (a) Define the term character set.

__________________________________________________________________________________________

[1 mark]

(b) Explain the differences between the ASCII and Unicode character sets.

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

[2 marks]

(c) The ASCII code for ‘A’ is 41 in hexadecimal.

Calculate the ASCII code in hexadecimal for ‘Z’. Show your working.

Working:

__________________________________________________________________________________________

__________________________________________________________________________________________

__________________________________________________________________________________________

ASCII code in hexadecimal for ‘Z’ = _____________________________________________________________

[2 marks]

Page 2 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

3. Character is another type of data.

The following tables show part of the ASCII code character set.

Character Denary Value Character Denary Value


A 65 a 97
B 66 b 98
C 67 c 99
D 68 d 100
E 69 e 101

(ii) Convert the following string into ASCII codes.

Bed

__________________________________________________________________________________________

[1 mark]

(iii) Give the denary ASCII code for the following character.

__________________________________________________________________________________________

[1 mark]

4. The Unicode character code for ‘G’ is 0047 in hexadecimal.

State, in hexadecimal, the Unicode character code for ‘D’.

__________________________________________________________________________________________

[1 mark]

Page 3 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

Sound

- Sound is an electrical representation of a sound wave.

- By nature, a sound wave picked up by a microphone is in analogue form.

- Since the computer understands only data in digital form, an Analogue-to-Digital Converter (ADC) is needed.

- Similarly, a Digital-to-Analogue Converter (DAC) is needed to convert the data from digital form to analogue so
that it can be played via speakers / headphone.

- Common file formats: .mp3, and .wav.

Analogue Data

- It consists of continuous values.

- It cannot be stored as it is. Approximations are needed.

Digital Data

- It consists of discrete values.

- It can be stored as it is. Approximations are not needed.

Reason for Sampling Sound Waves

- Sound waves are continuous in nature.

- This means that there is an infinite amount of detail to store.

- Since computers can only store data that has a limited number of data points (discrete values), it is difficult to
record perfectly.

- Therefore, sampling needs to be done.

Page 4 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

Before Sampling After Sampling

- Sound is a continuous set of data points formed by a - The discrete approximations can be used to
wave. recreate the original sound.

- Computers need to sample this sound at discrete - Due to limitations in the number of samples we
points to store a digital approximation. take we are often unable to truly represent a sound
wave.

- However, we can get close enough such that the


human ear cannot notice the difference.

Sampling

- The amplitude of a sound wave is measured at regular time intervals.

- This is done to get an approximation of the sound wave so that it can be converted into a digital signal.

Key Terms

1. Hertz (Hz)

- It is the unit of frequency (sample rate).

- It defined as the number of cycles per second of a periodic phenomenon.

2. Sample Rate

- It is the number of samples taken per second.

- It refers to the number of times the amplitude of the original sound wave is measured.

↑ Sample Rate ↑ Number of Data Points ↑ Accuracy ↑ File Size

Page 5 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

Note:

1. When recording music in MP3 format, the following sample rates are commonly used: 32000, 44100 or 48000
Hz.

2. Recording the human voice requires a lower sampling rate of around 8000 Hz.

3. Sample Resolution (also known as Bit Depth)

- It is the number of bits used to store each sample.

- It is also defined as the number of distinct values available to encode / represent each sample.

↑ Sample Resolution ↓ Quantisation Error ↓ Distortion


↑ Accuracy ↑ File Size

Note:

1. Typical values for a sample resolution are 8, 16, 24 or 32 bit.

2. The sampling resolution used for a CD is typically 16 bits per sample.

Exercises

1. Sound can be represented in a computer in a digital format.

Give the definition of the following:

(a) Sampling

______________________________________________________________________________________

______________________________________________________________________________________

[2 marks]

(b) Sample Rate

______________________________________________________________________________________

______________________________________________________________________________________

[2 marks]

Page 6 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

(c) Sample Resolution

______________________________________________________________________________________

______________________________________________________________________________________

[2 marks]

2. Give one benefit and one drawback of using a higher sample rate.

Benefit: _______________________________________________________________________________

______________________________________________________________________________________

Drawback: _____________________________________________________________________________

______________________________________________________________________________________

[2 marks]

3. Describe the difference between analogue data and digital data.

Analogue Data: _________________________________________________________________________

______________________________________________________________________________________

[1 mark]

Digital Data: ___________________________________________________________________________

______________________________________________________________________________________

[1 mark]

4. Give one benefit and one drawback of using a higher sample resolution.

Benefit: _______________________________________________________________________________

______________________________________________________________________________________

Drawback: _____________________________________________________________________________

______________________________________________________________________________________

[2 marks]

Page 7 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

5. John has decided to use a higher sample rate on an audio file. He would then upload the audio file on his
website.

Describe the effects increasing the sample rate would have on the audio file.

______________________________________________________________________________________

______________________________________________________________________________________

______________________________________________________________________________________

______________________________________________________________________________________

[4 marks]

Page 8 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

Image

- It is made up of a collection of pixels.


- Each pixel has its own color.
- The colour of each pixel is stored as a binary number which is then processed by a computer.
- Common file formats: .jpg and .png.

Key Terms

1. Pixel

- It is short for picture element.


- It is the smallest possible addressable area defined by a solid color, represented as binary, in an image.

2. Resolution

- It is a measure of the amount of detail that an image has.

- It refers to the number of pixels contained in an image per inch.

- It is measured in dots per inch (dpi).

- The higher the resolution, the more pixels will be used to produce an image. Thus, a more detailed image can be
produced.

Effect of Decreasing the Image Resolution

↑ Resolution ↑ Number of Pixels ↑ Image Quality ↑ File Size

Page 9 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

3. Colour Depth
- It is the number of bits used to represent the colour of a single pixel.
Formula: Number of Colours = 2 Colour Depth

Colour Depth Number of Colours Comment


1 21 = 2 Stores only black and white (monochrome image).
4 24 = 16 Stores limited colours.
8 28 = 256 Close to reality.
24 224 = 16777216 Difficult to see difference between image and reality.

↑ Colour Depth ↑ Number of Colours ↑ Image Quality ↑ File Size

Exercises

1. Four computer graphics terms and seven descriptions are shown below. Draw a line to link each term to its
correct description.

Term Description

Graphic Image It is measured in dots per inch (dpi); this value


determines the amount of detail an image has.

Image Resolution It is short for picture element.

Colour Depth It is the number of bits used to represent the


colour of a single pixel.

Pixel It is made up of rows and columns of picture


elements.

[4 marks]

Page 10 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

2. Bitmap graphics are used to represent squares. These can be saved in a number of different image
resolutions.
Give the number of bits required to store each pixel for a black and white bitmap.
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
[1 mark]

3. Identify how many bits are required to store each pixel for a 256-colour bitmap. Explain your answer.
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
[1 mark]

4. Xander creates a presentation that includes images, video and sound. An image can be made up of any
number of colours. Each colour is represented by a unique binary number.

Draw one line from each box on the left, to the correct box on the right to identify the minimum number of bits
needed to store each maximum number of colours.

Maximum Number of Colours Minimum Number of Bits

68 1

256 2

127 3

2 7

249 8

[5 marks]

Page 11 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

5. A computer has a bitmap software.

Define the following terms:


(a) Pixel
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

(b) Screen Resolution


_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

(c) Colour Depth


_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
[3 marks]

6. A black and white image is shown.

Explain how a computer can store this image.


__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
[4 marks]

Page 12 of 13
Computer Science Tuition by Mr Chelliah | Maurel Road, Riviere Du Rempart | 59236057

7. A company is designing a website.


The company creates a 4-colour bitmap image for the website as shown. Each colour is represented by a letter,
for example, G = grey, K = black.

State the minimum number of bits needed to represent each pixel in the image.
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
[2 marks]

Page 13 of 13

You might also like