chapter 1 p2.pptxhgchvvvggvggggggggggggg

sherazsubhan961 6 views 48 slides Mar 11, 2025
Slide 1
Slide 1 of 48
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48

About This Presentation

i9sse


Slide Content

Chapter 1 By Amna Javed

Text, Sound and Images

Character Sets-ASCII code and Unicode https://www.youtube.com/watch?v=5aJKKgSEUnY

Character Sets-ASCII code Text is a collection of  characters  that can be represented in binary, which is the language that computers use to process information To represent text in binary, a computer uses a  character set , which is a  collection of characters and the corresponding binary codes that represent them One of the most commonly used character sets is the American Standard Code for Information Interchange ( ASCII ), which assigns a unique  7-bit binary code to each character , including uppercase and lowercase letters, digits, punctuation marks, and control characters E.g. The ASCII code for the uppercase letter  'A' is 01000001 , while the code for the character  '?' is 00111111

Unicode ASCII has limitations in terms of the number of characters it can represent, and  it does not support characters from languages other than English To address these limitations,  Unicode  was developed as a character encoding standard that allows for a  greater range of characters and symbols  than ASCII, including  different languages and emojis Unicode uses a  variable-length encoding scheme  that assigns a unique code to each character, which can be represented in binary form using multiple bytes E.g. The Unicode code for the  heart symbol is U+2665 , which can be represented in binary form as  11100110 10011000 10100101 As Unicode requires  more bits per character than ASCII , it can result in  larger file sizes  and slower processing times when working with text-based data

Past Paper Questions

Past Paper Questions

Marking Scheme

Representation of Sound

Representation of Sound Sound  is a type of  analog signal  that is captured and  converted into digital form  to be processed by a computer. To convert sound into digital form, a process called  sampling  is used. This involves  taking measurements of the sound wave  at  regular intervals  and  converting these measurements into binary data The  quality  of the digital sound  depends on the sample rate , which is the  number of samples taken per second . A  higher sample rate  results in a  more accurate representation of the original sound wave , but also  increases the file size  of the digital sound E.g. A typical  CD-quality  digital sound has a sample rate of  44.1 kHz , which means that  44,100 samples are taken per second The  sample resolution  is another factor that affects the quality of the digital sound. This refers to the  number of bits per sample , which determines the  level of detail and accuracy of each sample A  higher sample resolution  results in a  more accurate representation of the sound wave , but also  increases the file size  of the digital sound E.g. A  CD-quality  digital sound typically has a  sample resolution of 16 bits , which means that each sample is represented by a 16-bit binary number

Past Paper Question

Marking Scheme

Representation of Images A  bitmap image  is made up of a series of  pixels , which are small dots of color that are arranged in a grid. Each  pixel  can be represented by a  binary code , which is processed by a computer The  resolution  of an image refers to the  number of pixels in the image . A  higher resolution image has more pixels  and is, therefore,  sharper  and  more detailed  but also  requires more storage space The  color depth  of an image refers to the  number of bits used to represent each color . A  higher color depth  means that  more colors can be represented , resulting in a  more realistic image  but also  requires more storage space E.g. an  8-bit color depth  allows for  256 different colors  to be represented (28 8 = 256), while a  24-bit color depth  allows for  over 16 million different colors  to be represented (2 24 = 16,777,216) The  file size of an image increases  as the  resolution  and  color depth increase . This is because  more pixels  and  colors  require  more binary data  to represent them The  quality  of an image also  increases  as the  resolution  and  color depth increase . However, it's important to balance the desired quality with the practical limitations of storage space

Bitmap

Bitmap

Bitmap

Past Paper Question

Marking Scheme

Data Storage

Measurement of Data Storage The smallest unit of measurement is the  bit , which represents a single binary digit  (either 0 or 1) A  nibble  is a group of  4 bits , while a  byte  is a group of  8 bits

File Size of an Image file Determine the resolution of the image in pixels (width x height) Determine the colour depth in bits (e.g. 8 bits for 256 colours ) Multiply the number of pixels by the colour depth to get the total number of bits Divide the total number of bits by 8 to get the file size in bytes If necessary, convert to larger units like kibibytes , mebibytes , etc

Past Paper Question

Marking Scheme

Past Paper Question

Marking Scheme

Examples A photograph is 1024 x 1080 pixels and uses a color depth of 32 bits. How many photographs of this size would fit onto a memory stick of 64 GiB ? A camera detector has an array of 2048 by 2048 pixels and uses a color depth of 16. Find the size of an image taken by this camera in MiB .

Copy Work Activity 1.16 (1,2)

File Size of a Sound file Determine the sample rate in Hz (e.g. 44,100 Hz) Determine the sample resolution in bits (e.g. 16 bits) Determine the length of the track in seconds Multiply the sample rate by the sample resolution to get the number of bits per second Multiply the number of bits per second by the length of the track to get the total number of bits Divide the total number of bits by 8 to get the file size in bytes If necessary, convert to larger units like kibibytes , mebibytes , etc

Sound Channels Sound is separated into channels, and with two channels instead of one, you'll hear more depth to your music . Also called stereo (as opposed to mono), sound is separated into left and right speakers. You'll use two speakers positioned a distance apart, facing the listener.

Past Paper Question

Past Paper Question

Copy Work Activity 1.16 (3,4)

Data Compression Compression is used to reduce the file size so it require less: Storage space Transmission time Bandwidth (max rate of transfer of data across a network)

Types of Compression There are 2 types of compression: Lossy Compression Lossless Compression

Lossy Compression Some data is lost and cannot be recovered Greatly reduces the file size Reduces the quality of the image/sound Cannot be used with text or executable files Suitable for images(JPEG), sound and videos (MP3/MP4)

Lossy Compression Method (MP3/MP4)

Lossy Compression Method (JPEG)

JPEG

Lossless Compression No data is lost just encoded differently Files are recovered to their original state Can be used with all types of data Less effective at reducing file size Most suitable for text documents, spread sheet, databases and executable files

RLE ( Run Length Encoding) It reduces the size of a string of adjacent, identical data (e.g. repeated colours in an image) A repeating string is encoded into two values: the first value represents the number of identical data items (e.g. characters), and the second value represents the code of the data item (such as ASCII code if it is a keyboard character), e.g. ‘ aaaaabbbbccddddd ’ becomes “05 97 04 98 02 99 05 100.” RLE is only effective where there is a long run of repeated units/bits One difficulty is that RLE compression isn't perfect for strings like " cdcdcdcdcd ". We use a flag to solve this; e.g., 255 can be made as the flag. Now 255 will be put before every repeating value, e.g. our previous example becomes 255 05 97 255 04 98 255 02 99 255 05 100 where 255 now indicates that the next character/set of characters is approaching

RLE for Text

RLE for Text

RLE for Images

Lossless Compression

Past Paper Question

Marking Scheme
Tags