Bit patterns Analogue And Digital Flashcards

1
Q

AQA Computer Science A-Level

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

4.5.6 Representing images

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

sound and other data

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Intermediate Notes

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

www.pmt.education

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Specification:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

4.5.6.1 Bit patterns

A

images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe how bit patterns may represent other forms of data

A

including

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

graphics and sound.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

4.5.6.2 Analogue and digital:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Understand the difference between analogue and digital:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

● data

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

● signals

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

4.5.6.3 Analogue/digital conversion:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Describe the principles of operation of:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

● an analogue to digital converter (ADC)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

● a digital to analogue converter (DAC)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Know that ADCs are used with analogue sensors.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Know that the most common use for a DAC is to convert a digital audio

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

signal to an analogue signal.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

4.5.6.4 Bitmapped graphics:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Explain how bitmaps are represented.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Explain the following for bitmaps:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

● resolution

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

● colour depth

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

● size in pixels

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Calculate storage requirements for bitmapped images and be aware

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

that bitmap image files may also contain metadata.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Be familiar with typical metadata.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

4.5.6.5 Vector graphics:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Explain how vector graphics represents images using lists of objects.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Give examples of typical properties of objects.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Use vector graphic primitives to create a simple vector graphic.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

www.pmt.education

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

4.5.6.6 Vector graphics versus bitmapped graphics:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Compare the vector graphics approach with the bitmapped graphics

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

approach and understand the advantages and disadvantages of each.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Be aware of appropriate uses of each approach.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

4.5.6.7 Digital representation of sound:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Describe the digital representation of sound in terms of:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

● sample resolution

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

● sampling rate and the Nyquist theorem

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

Calculate sound sample sizes in bytes.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

4.5.6.8 Musical Instrument Digital Interface (MIDI):

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

Describe the purpose of MIDI and the use of event messages in MIDI.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Describe the advantages of using MIDI files for representing music.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

4.5.6.9 Data compression:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

Know why images and sound files are often compressed and that other

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

files

A

such as text files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

Understand the difference between lossless and lossy compression and

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

explain the advantages and disadvantages of each.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Explain the principles behind the following techniques for lossless

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

compression:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

● run length encoding (RLE)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

● dictionary-based methods

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

4.5.6.10 Encryption:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

Understand what is meant by encryption and be able to define it.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

Be familiar with Caesar cipher and be able to apply it to encrypt a

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

plaintext message and decrypt a ciphertext. Be able to explain why it is easily

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

cracked.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

Be familiar with Vernam cipher or one-time pad and be able to apply it

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

to encrypt a plaintext message and decrypt a ciphertext. Explain why Vernam

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

cipher is considered as a cypher with perfect security.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

Compare Vernam cipher with ciphers that depend on computational

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

security.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

www.pmt.education

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

Bit patterns

A

images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

So far

A

we’ve only seen bit patterns used to represent ​numbers​. However

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

use bit patterns to represent ​all other forms of data​

A

including ​pictures ​and ​sound​.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

Analogue and digital

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

Analogue ​data has ​no limits​ to the values that it can take. In contrast

A

digital data can only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
79
Q

take ​particular values​.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

Analogue and digital signals vary in a similar way. An analogue signal can take ​any values

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

and can change ​as much as required​ whereas a digital signal must always take​ one of a

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
82
Q

specified range of values​ and can only change value ​at specified intervals​.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
84
Q

Analogue signal

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
86
Q

Digital signal

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
87
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
88
Q

Analogue/digital conversion

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
89
Q

Digital to analogue conversion

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
90
Q

When converting from digital to analogue

A

a device called a ​digital to analogue converter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
91
Q

(or ​DAC ​for short) is used. The device reads a bit pattern representing an analogue signal

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
92
Q

and outputs an analogue electrical ​current​.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
93
Q

Analogue to digital conversion

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
94
Q

When a computer needs to make use of analogue sensors

A

they use an ​analogue to digital

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
95
Q

converter ​(​ADC​ for short) to convert the analogue signal to a digital bit pattern. The device

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
96
Q

works by taking a ​reading ​of an analogue signal at ​regular intervals​ and recording the

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
97
Q

value in a process called ​sampling​.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
98
Q

Samples are taken at a specific ​frequency​

A

which determines the ​number of samples taken

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
99
Q

per second​. This is usually a​ high number​.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
100
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
101
Q

www.pmt.education

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
102
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
103
Q

Once the value of the analogue signal has been recorded

A

it can be stored ​digitally ​as a bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
104
Q

pattern.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
105
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
106
Q

Bitmapped graphics

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
107
Q

Computers represent ​images ​in two different ways

A

one of which is by using​ bitmap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
108
Q

graphics​. In bitmap graphics

A

an image is broken down into ​pixels​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
109
Q

binary ​value assigned to it.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
110
Q

The ​resolution ​of an image refers to the ​number of pixels​ in an image

A

for example

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
111
Q

image below could be said to have a resolution of ​5 × 5 ​pixels.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
112
Q

The ​value assigned​ to a pixel ​determines the colour ​of the pixel. The example below

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
113
Q

shows the ​binary representation​ of a simple bitmap image in which a 1 represents a black

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
114
Q

pixel and a 0 represents a white pixel.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
115
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
116
Q

1 0 0 0 1

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
117
Q

1 1 0 1 1

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
118
Q

1 0 1 0 1

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
119
Q

1 0 0 0 1

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
120
Q

1 0 0 0 1

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
121
Q

The ​number of bits​ assigned to a pixel in an image is called its ​colour depth​. In the

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
122
Q

example above

A

each pixel has been assigned ​one bit​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
123
Q

represented.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
124
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
125
Q

www.pmt.education

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
126
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
127
Q

00 11 11 11 11 11 00

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
128
Q

11 11 11 11 11 11 11

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
129
Q

11 00 01 11 00 01 11

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
130
Q

11 00 00 11 00 00 11

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
131
Q

11 11 11 11 11 11 11

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
132
Q

11 11 10 10 10 11 11

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
133
Q

00 11 11 11 11 11 00

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
134
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
135
Q

In order to calculate the ​storage required​ to represent a bitmap image

A

multiply the ​number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
136
Q

of pixels​ (width × height) by the​ bit depth​.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
137
Q

The picture of the face has 7 × 7 = 49 pixels

A

each of which is assigned ​two bits​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
138
Q

requires​ 98 bits ​to be represented.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
139
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
140
Q

7 × 7 × 2 = 98 bits

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
141
Q

This method of calculating the storage requirements for bitmapped images produces a

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
142
Q

minimum value​. This is because bitmap image files may also contain ​metadata​

A

typical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
143
Q

examples of which include the image’s ​width​

A

​height​

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
144
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
145
Q

www.pmt.education

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
146
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
147
Q

Vector graphics

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
148
Q

Vector graphics represent images using ​objects ​and ​shapes ​such as rectangles

A

circles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
149
Q

and lines. The ​properties ​(such as fill colour

A

fill style and dimensions) of each geometric

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
150
Q

object or shape in the image are stored in a ​list​.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
151
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
152
Q

shape

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
153
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
154
Q

properties

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
155
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
156
Q

rectangle

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
157
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
158
Q

fill-colour: green

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
159
Q

fill-style: solid

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
160
Q

height: 2

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
161
Q

width: 10

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
162
Q

start-position: (0

A

0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
163
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
164
Q

square

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
165
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
166
Q

fill-colour: yellow

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
167
Q

fill-style: vignette

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
168
Q

width: 6

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
169
Q

start-position: (4

A

2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
170
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
171
Q

triangle

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
172
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
173
Q

fill-colour: grey

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
174
Q

fill-style: solid

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
175
Q

width: 7

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
176
Q

start-position: (3

A

8)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
177
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
178
Q

Vector graphics versus bitmapped graphics

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
179
Q

Because vector graphics use shapes rather than pixels

A

they can be enlarged ​without

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
180
Q

losing quality​. Enlarging a bitmap image results in a ​blurry ​or even ​pixelated ​image

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
181
Q

whereas enlarging a vector graphic results in ​no loss of clarity​.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
182
Q

Vector graphics frequently use ​less storage space ​than bitmapped graphics

A

as

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
183
Q

information is stored for each shape

A

rather than for every single pixel in an image.

185
Q

www.pmt.education

187
Q

Digital representation of sound

188
Q

Computers represent sound as a ​sequence of samples​

A

each of which takes a ​digital

189
Q

value​. The number of samples per second is called the ​sampling rate​.

191
Q

Analogue signal sampled

193
Q

Samples used to recreate signal

194
Q

digitally

196
Q

The​ number of bits​ allocated to each sample is referred to as the ​sample resolution​.

197
Q

Higher sample resolutions result in ​greater audio quality​ but also​ increased file size​.

198
Q

The size of a sound sample can be calculated by ​multiplying together​ the ​duration of the

199
Q

sample in seconds​

A

the ​sampling rate in Hertz​ and the ​sample resolution​.

200
Q

For example

A

a ​45 second long​ audio file sampled at ​500 Hz​ with a sample resolution of ​16

201
Q

bits​ would require ​45000 bytes ​of storage.

203
Q

45 × 500 × 16 = 360000 bits

204
Q

360000 ÷ 8 = 45000 bytes

205
Q

The Nyquist Theorem

206
Q

The Nyquist theorem states that the sampling rate of a digital audio file must be ​at least

207
Q

twice​ the frequency of the sound. If the sampling rate is below this

A

the sound may not be

208
Q

accurately represented.

210
Q

www.pmt.education

212
Q

Musical Instrument Digital Interface (MIDI)

213
Q

Musical instrument digital interface

A

or ​MIDI​

214
Q

which can be ​connected to computers​. MIDI stores sound as a series of​ event messages​

215
Q

each of which represents an ​event​ in a piece of music. These can be thought of as a

216
Q

series of instructions ​which could be used to recreate a piece of music.

217
Q

Event messages could contain information such as:

218
Q

● The ​duration ​of a note

219
Q

● The ​instrument ​with which a note is played

220
Q

● How ​loud ​a note is (its ​volume​)

221
Q

There are numerous advantages to using MIDI over a sampled recording of a piece of

222
Q

music. Using MIDI allows ​easy manipulation​ of music ​without loss of quality​. The

223
Q

instruments on which notes sound can be changed

A

notes can be ​changed ​and the

224
Q

duration of notes can be altered.

225
Q

Furthermore

A

MIDI files are often ​smaller in size​ than sampled audio files.

226
Q

However

A

MIDI ​can’t be used for storing speech​ and sometimes results in a​ less realistic

227
Q

sound ​than sampled recordings.

229
Q

Data compression

230
Q

FIles are compressed in order to​ reduce their size​. Smaller files can be​ transferred faster

231
Q

between storage devices.

232
Q

Images are often compressed

A

but sound files and text files can also be compressed.

233
Q

There are two categories of compression

A

​lossy ​and ​lossless​.

235
Q

Lossy compression

236
Q

When using lossy compression

A

​some information is lost​ in the process of reducing the

237
Q

file’s size. This could be​ reducing the resolution​ of an image or​ lowering the sample

238
Q

resolution ​of an audio file.

240
Q

www.pmt.education

242
Q

Lossless compression

243
Q

In contrast to lossy compression

A

there is​ no loss of information ​when using lossless

244
Q

compression. The size of a file can be reduced ​without decreasing its quality​.

245
Q

Two methods of lossless compression are​ run length encoding ​and ​dictionary-based

246
Q

methods​.

247
Q

Run length encoding (RLE)

248
Q

Run length encoding (​RLE​ for short) ​reduces the size​ of a file by removing ​repeated

249
Q

information​ and replacing it with ​one occurance ​of the repeated information followed by the

250
Q

number of times​ it is to be repeated.

252
Q

BLUE​

254
Q

BLUE​

255
Q

2​ PURPLE​

257
Q

BLUE​

258
Q

2​ YELLOW​

260
Q

BLUE​

261
Q

2​ PURPLE​

263
Q

BLUE​

264
Q

2​ YELLOW​

267
Q

Using RLE to​ replace repeated pixels​ with one pixel colour and a ​number or repetitions

268
Q

reduces the storage space required to represent the image.

270
Q

www.pmt.education

272
Q

Dictionary-based methods

273
Q

When a file is compressed with a dictionary-based method

A

a ​dictionary ​containing

274
Q

repeated data​ is ​appended ​to the file.

275
Q

For the picture above

A

the dictionary on the left could be used.

291
Q

Using the dictionary

A

the file could be represented using just the data ​12323​

292
Q
A

as shown on

293
Q

the right.

294
Q

This method results is a ​significant reduction​ in size

A

but don’t forget that the dictionary

295
Q

used to compress the data ​has to be present in the file ​in order for the image to be

296
Q

reproduced. This will​ increase the size​ of the file.

297
Q

Lossy Compression

299
Q

Lossless Compression

301
Q

Some information is lost ​in the

302
Q

compression process

304
Q

No loss​ of information

306
Q

Quality of file is​ reduced

308
Q

No loss​ of quality

310
Q

Encryption

311
Q

Encryption is the process of ​scrambling data​ so that it ​cannot be understood if intercepted

312
Q

in order to ​keep it secure during transmission​. Unencrypted information is referred to as

313
Q

plaintext ​and encrypted information is called ​ciphertext​. A ​cipher ​is a type of encryption

314
Q

method.

315
Q

In order to decrypt ciphertext

A

you must know the ​encryption method ​used and the ​key

316
Q

used to encrypt the information.

318
Q

www.pmt.education

320
Q

Caesar ciphers

321
Q

Caesar ciphers encrypt information by ​replacing characters​. One character is ​always

322
Q

replaced by the ​same character​. There are two types of Caesar cipher that you need to be

323
Q

aware of. ​Shift ciphers ​and ​substitution ciphers​.

324
Q

Shift ciphers

325
Q

When encrypting using a shift cipher

A

all of the letters in the alphabet are ​shifted by the

326
Q

same amount​. The amount by which characters are shifted forms the key.

327
Q

Plaintext

329
Q

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

331
Q

X Y Z A B C D E F G H I J K L M N O P Q R S T U V W

332
Q

Ciphertext

334
Q

The example above uses a ​shift​ of three characters

A

so the key is ​three​. Using the key

335
Q

three

A

the plaintext “​BAT​

336
Q

” could be encrypted as the ciphertext “​YXQ​

337
Q

”.

338
Q

Substitution ciphers

339
Q

Substitution ciphers are a type of Caesar cipher in which letters are ​randomly replaced​.

340
Q

Plaintext

342
Q

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

343
Q

F J E D M K B I C H L S A T U R V W G Y Q N P Z X O

344
Q

Ciphertext

346
Q

Using the cipher in the example

A

the plaintext “​DOG​

347
Q

” would be encrypted as “​DUB​

348
Q

”.

349
Q

Caesar ciphers can be​ easily cracked​. For example

A

the most frequently occurring letter in

350
Q

an encrypted message is likely to be an ​E​

353
Q

www.pmt.education

355
Q

Vernam ciphers

356
Q

The Vernam cipher is an example of a one-time pad cipher. This means that ​each key

357
Q

should only ever be used once​. Additionally

A

the Vernam cipher requires the key to be

358
Q

random ​and ​at least as long as the plaintext​ that is to be encrypted.

359
Q

The Vernam cipher works by:

360
Q
  1. Aligning ​the characters of the ​plaintext ​and the ​key
361
Q
  1. Converting each character to ​binary ​(using an
362
Q

information coding system​)

363
Q
  1. Applying a logical ​XOR ​operation to the two bit
364
Q

patterns

365
Q
  1. Converting the result back to a character
366
Q

Example

A

encrypting:

372
Q

1001000

374
Q

1001001

380
Q

Key binary

382
Q

1110101

384
Q

1110010

386
Q

Plaintext binary

387
Q

XOR key binary

389
Q

111101

391
Q

111011

397
Q

Plaintext

398
Q

Plaintext binary

401
Q

Ciphertext

403
Q

In the example above

A

each of the characters in the plaintext and the key are converted to

404
Q

binary

A

then XORed before being converted back to characters.

405
Q

As the example shows

A

the plaintext ​HI​is encrypted by a Vernam cipher with the key ​ur

406
Q

as the ciphertext ​=;​

409
Q

www.pmt.education

411
Q

Example

A

decrypting:

412
Q

When decrypting using a Vernam cipher

A

the key that was used to encrypt the plaintext is

413
Q

used again.

419
Q

111101

421
Q

111011

427
Q

Key binary

429
Q

1110101

431
Q

1110010

433
Q

Ciphertext binary

434
Q

XOR key binary

436
Q

1001000

438
Q

1001001

444
Q

Ciphertext

445
Q

Ciphertext binary

448
Q

Plaintext

450
Q

The Vernam cipher is the only cipher mathematically proven to be completely secure.

451
Q

Computational security

452
Q

All ciphers other than the Vernam cipher are

453
Q

reasonable timeframe given current computing power. Ciphers that use this form of

454
Q

security are said to rely on ​computational security​.

456
Q

www.pmt.education