Download presentation
Presentation is loading. Please wait.
Published byMartin Green Modified over 6 years ago
1
GCSE COMPUTER SCIENCE Topic 3 - Data 3.2 Data Representation
2
This presentation covers the following content from the specification
Students should: 3.2.1 understand how computers encode characters using ASCII 3.2.2 understand how bitmap images are represented in binary (pixels, resolution, colour depth) 3.2.3 understand how sound, an analogue signal, is represented in binary 3.2.4 understand the limitations of binary representation of data (sampling frequency, resolution) when constrained by the number of available bits
3
Character Sets Computers have to be able to represent letters and symbols as well as numbers. Simply, the idea is to give each character a number, as a code and store the codes and their meanings in a table. Character Set The defined list of characters recognised by a computers hardware and software.
4
ASCII A common code is ASCII - the American Standard Code for Information Interchange. This uses 7 bits to store characters. Seven bits is enough to code 128 different characters. Symbol Binary A B C D E F ACTIVITY Using this information write a definition of ASCII in your exercise books. You do need to know what it stands for and how many bits it uses. Extended ASCII is an alternative character set, this uses 8-bits so can store more than 128 characters. Unicode is another alternative character set. It uses 16 bits to encode each character and can represent far more characters than ASCII (over 65,000). ALTERNATIVES
5
Unicode Unicode is an alternative character set and encoding system. It uses 16 bits to encode each character and is therefore able to represent far more characters than ASCII (over 65,000).
6
Use the table of ASCII binary codes to decode these letters
Activity 1 Use the table of ASCII binary codes to decode these letters ASCII Binary Code Decimal Value Character 104 h
7
Use the table of ASCII binary codes to decode this:
Activity 2 Use the table of ASCII binary codes to decode this: Character Decimal Value ASCII Binary Code H o l a n d Character Decimal Value ASCII Binary Code P a r k
8
Activity 3 What is the ASCII code for a blank space?
Copy and complete the questions below. Question Answer What is the ASCII code for a blank space? Why is it important to have a code for a blank space? Otherwise the computer would not recognise where one word finishes and the next begins. Write your name in ASCII. Write a word of your choice in binary in your book. Swap with the person next to you and see if you can decode each others word.
9
Bitmap Images Images can be represented using a grid of squares called pixels. Each pixel can be uniquely identified by its position in the grid (x/y coordinates) and each pixel is a single colour. Pixel The dots that make up an image on screen ACTIVITY Write these definitions of a Bitmap Image and a pixel in your book. Interactive Activity
10
Resolution The resolution is the number of pixels that make up an image. 5 pixels wide The image size of this image is: 5 * 6. Therefore the resolution of this image is 30. 6 pixels high
11
Write this definition of Colour Depth in your exercise book.
A binary code is used to represent the colour of a pixel. The number of bits used to store each pixel’s colour is known as the colour depth. The greater the colour depth, the more colours can be represented. ACTIVITY Write this definition of Colour Depth in your exercise book. The number of colours that can be represented can be calculated using 2depth. For example a colour depth of 1 bit can represent 2 colours. 2no. of bits Therefore 3 bits = 2 3
12
Complete the colour depth table below.
Activity 4 Complete the colour depth table below. Colour depth Number of colours Range 1 bit (21) 2 0 - 1 2 bit (22) 3 bits (23) 0-7 4 bits (24) 16 8 bits (28) 16 bits (216) 65536 24 bits (224) 32 bits (232)
13
1-Bit Images 1, 0, 0, 0, 1 1, 1, 1, 1, 0 Leave space here
This image has only two colours, black and white and therefore has a colour depth of 1 bit. 1, 0, 0, 0, 1 Leave space here 1 = white 0 = black 1, 1, 1, 1, 0 1, 0, 0, 0, 0 0, 1, 1, 1, 0 0, 1, 1, 1, 0 1, 0, 0, 0, 0
14
Activity 5 Copy and complete the grid below to reveal what character this code produces. Binary code 00000 01111 11110 1 = white 0 = black Use a ruler.
15
Activity 6 Produce the binary code to produce the letter ‘G’ in the grid below. Binary code 1 = white 0 = black Use a ruler. Hint: Do the sketch first
16
The first number always represents white.
How could his be stored more efficiently? This image has only two colours, black and white. 1, 3, 1 The first number always represents white. 4, 1 1, 4 0, 1, 3, 1 0, 1, 3, 1 1, 4 ACTIVITY Complete the Image Representation worksheet using this method.
17
Image data has limitations when it is represented using binary values
Image Limitations Image data has limitations when it is represented using binary values Resolution If the resolution of an image is low, the quality of the image will be reduced. Example 1 Example 2 The above image pairs have the same image size, but a different resolution, the main factor is the size of the pixels.
18
Data Analogue Data Is continuous, allowing for an infinite number of possible values. Digital Data Is discrete, it has a limited set of values. To be handled by a computer, analogue data has to be converted to digital (or digitised). ACTIVITY Write these two definitions in your book.
19
The number of samples taken per second, measured in Hertz.
Sound Sampling The process of digitising sound. Sampling an analogue wave involves taking samples at evenly spaced time intervals and representing the samples as numerical values. Sampling Rate The number of samples taken per second, measured in Hertz. Bit Depth The number of bits used to store each sample (sometimes called sample resolution).
20
File Size of Sound You need to understand how to calculate the file size of a sound. You need four pieces of information: Sample Rate Hertz Bit Depth Bits Channels Mono = Stereo = 2 Duration Seconds You only need to show how it would be calculated, you don’t need to perform the actual calculation.
21
File Size of Sound sampling rate (in Hz) x bit depth (in bits)
You can calculate the file size of sound using the following formula: sampling rate (in Hz) x bit depth (in bits) channels duration (in seconds) You get marks for showing the working out, not the result
22
Write this example in your book
File Size of Sound Worked Example Formula Calculation Addition Information sampling rate (in Hz) x bit depth (in bits) channels duration (in seconds) 44,100 x 16 2 150 sample rate of a CD bit rate of a CD stereo 2.5 minutes in seconds ACTIVITY Write this example in your book
23
Activity 3 Question Answer Describe the process of converting analogue sound waves into digital data. Sampling an analogue sound wave involves taking samples at evenly spaced time intervals and representing the samples as numerical values. What is the difference between analogue and digital data? Analogue data is continuous, digital data is discrete, that means it has a limited set of values. What is meant by the term ‘sampling rate’? The number of samples taken per second, measured in Hertz. What is meant by the term ‘bit depth’? The bit depth is the number of bits used to store each sample.
24
Activity 4 Use the Internet to help you answer these questions. Question Answer What is the sampling rate for CD audio? Give your answer in KHz. 44,100Hz (44.1 KHz) How many bits per sample (bit depth) are used for CD audio? 16 What about bit-depth for DVD audio? 24 Why do most sound recordings have two channels? So they can use stereo sound. This means different sounds can be produced. For example on a left and right speaker.
25
Activity 5 Question Answer Show the working to calculate the file size of a CD quality, stereo sound track that is 2.5 minutes long. 44,100 * 16 * 2 * 150 Show the working to calculate the file size of a CD quality, mono sound track that is 4 minutes long. 44,100 * 16 * 1 * 240 Show the working to calculate the file size of a DVD quality (24 bit) , stereo sound track that is 5 minutes long. 44,100 * 24 * 2 * 300
26
Sound Limitations Audio data has limitations when it is represented using binary values Sampling Rate If fewer samples are taken, the recording wont match the original as close and it may appear distorted or muffled. However, it will result in a smaller file size. Think about all the times you have watched a YouTube video that has poor sound, this could be the reason!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.