Presentation is loading. Please wait.

Presentation is loading. Please wait.

By the end of this session you should be able to... Understand character sets and why these are used within computer systems. Understand how characters.

Similar presentations


Presentation on theme: "By the end of this session you should be able to... Understand character sets and why these are used within computer systems. Understand how characters."— Presentation transcript:

1 By the end of this session you should be able to... Understand character sets and why these are used within computer systems. Understand how characters are represented in binary. Understand how images are represented in binary. Understand how sound can be sampled and stored in computer systems. Understand the need for compression and types of compression.

2 Good Practice Write the date at the top of a new page at the start of every lesson When you see the pen symbol, copy down what is on the board (you can put it into your own words). Your book will be checked regularly, it must be presentable. When you see the book symbol with a page number, you should turn to that page in your text book. Page: 00

3 Characters When you press a key on the keyboard, code is generated that is converted into a symbol. ASCII (American Standard Code for Information Interchange) is an industry standard. Unicode is an extension of ASCII but instead of 7 bits uses up to 32 bits

4 Task Find on the internet the Unicode and ASCII tables. Print them out and stick them in your book. You do not need to know these off by heart!

5 Python task Every character in Python makes use of ASCII codes. That is to say each character you use has a relevant code within a table. To see these codes we use ord and chr. So for example: print (ord(‘a’)) gives 97 and print (chr(97)) gives a. Have a go at using ord and chr in Python. Remember to print screen and annotate your work to be stuck in your book.

6 Python continued Now we know it is possible to find the reference number for an ASCII character in Python it is also possible to find the binary for this character. Task – type print(bin(ord(‘a’))) to see the binary for the letter a. Have a go at using bin ord and bin chr in Python. Remember to print screen and annotate your work to be stuck in your book.

7 Question Why is it useful to know the ASCII code and binary for a character? When might a computer programmer make use of ASCII codes? Think about the international nature and collaborative nature of modern program development.

8 These are the same?!

9 Well yes. Both of the previous images were made up of pixels A pixel is the smallest element on the screen that makes up the image The more bits per pixel, the greater the depth or range of colours

10 Metadata Metadata is information about the image data that allows the computer to recreate the image from the binary data in the file. This must contain the height and width in pixels and the colour depth in bpp (bits per pixel)

11 Task Using Software on the computer create different size images of different quality. Explain why these images have been different colour depths and resolution. Stick the images and write ups in your exercise book

12 Exam question How does the resolution of an image affect the size of the file? What do we mean by image size? What metadata is stored with an image file? If an image has its colour depth decreased what is the effect? How many colours can be represented using a 4-bit colour depth?

13 Sound Sound is represented in computers as binary just like images. It is the metadata that tells the computer what type of file it should treat the data as. Sound waves are analogue but computers work in binary, so peaks and troughs are converted into 1s and 0s The more times the computer samples the wave the larger the file will be.

14 Task Draw a sound wave in your book and show how a computer would represent this. What do you notice?

15 Instructions When a computer is instructed to run a program it is directed to the start address for these data instructions. A program instruction has two parts, the operator and the operand It is the operators job to tell the CPU what to do and the operands job to tell the CPU what to apply the instruction to.

16 Exam questions Why are there so few tracks on a typical audio CD? How does the sample rate affect the quality of the playback for an MP3 sound track? What effect does a high bit rate have on the number of sound files that can be stored on a CD? Explain how instructions are coded in binary in a computer. Explain how a computer distinguishes between instructions and data.

17 Data compression Imagine you have a very large file you wish to send over a network. We know that networks have a limited bandwidth, we also know people want things straight away! So compression of data is important if we want to send data more quickly and keep computer users happy!

18 Lossy and Lossless Compression Lossy compression involves removing some of the data from the file for compression. Lossless compression involves storing coded information about a file so it can be re-created later. Example: The = 1 cat = 2 and = 3 dog = 4 The sentence, ‘the cat and the dog’ could be 1,2,3,1,4 Page:

19 Compression task Think of as many reasons as you can and complete the table below. Lossy advantages Lossy disadvantages Reasons why you might use lossy Lossless advantages Lossless disadvantages Reasons why you might use lossless

20 Exam Questions 1.Explain why compression must be lossless when sending a computer program as an email attachment. (2 marks) 2.Explain why vector images can’t be lossy. (2 marks) 3.Describe an advantage of lossy compression when sending images over a network. (2 marks)


Download ppt "By the end of this session you should be able to... Understand character sets and why these are used within computer systems. Understand how characters."

Similar presentations


Ads by Google