Analogue Data, Compression and Encryption
Analogue Data, Compression and Encryption
Data
Analogue Data, Compression and Encryption
Storage Units
In order to be able to calculate the file sizes of different types of file
you need to be able to convert between the different storage units.
bit (b)
byte (B) x8
kilobyte (KB) x 1024
megabyte (MB) x 1024
gigabyte (GB) x 1024
terabyte (TB) x 1024
Activity 1
Use a calculator to calculate the number of bytes.
Number of bytes
1024
1 kilobyte (KB) = 1024 bytes
The quality of the sound depends on the sampling rate, which is the number
of samples taken per second (measured in Hz) and the bit depth (the number
of bits used to store each sample).
Calculating File Size
You can calculate the file size of a sound using the following formula:
You can calculate the bit depth of a sound using the following formula:
Question Answer
Question Answer
An analogue-to-digital converter
samples the temperature of a furnace
every two hours. Each sample is stored
as a 32-bit number. How many bytes of
data are stored in a week?
Compression
Lossless Reduces the size of a file while retaining all the original
data.
Lossy Reduces the size of a file by permanently removing some
of the data.
Superchannel A form of compression where special data is selected for a
special reason. These data are separated from the rest, and
the rest are thrown out.
Activity 6
Describe the three strategies for compressing data in your own words:
Lossless compression is where the file is shrinked, but without losing data.
Lossless
Lossy
This method singles out a specific set of data, which is kept and any remaining data is
deleted.
Superchannel
Pros and Cons
Play this game to help you understand the pros and cons of each type of
compression.
Activity 7
Discuss the pros and cons of each method of compressing data.
Right click on each of the files in the folder, click on Send to / Compressed
(zipped) folder.
Activity 8
Fill in this table to help you see what a difference compression makes to file size.
AAAABBBBBBBBBCADDDDEEFFFFFFFF 4A9BCA4D2E8F
ABCABCABCABCABCABCABCABCABCS ABCABCABCABCABCABCABCABCABCS
BBGGYYAACCFFEEBBGGYYAACCFFEE 2B2G2Y2A2C2F2E2B2G2Y2A2C2F2E
Why is this?
It has more repetitive strings.
Describe in English the process the RLE
calculator follows to encode a piece of text.
Activity 12
Answer the questions below based on this text:
The wheels on the bus go round and round, round and round, round and round.
The wheels on the bus go round and round all day long.
The 2 3
wheels 2 6
on 2 2
the 2 3
bus 3
go 2
round 9
and 4
all 1
day 1
long 1
Activity 14
Complete this lookup table of all the words used more than once in the song.
Lookup table
0 The
1 wheels
2 on
3 the
4 and
5 round
6 bus
7 go
Activity 15
Use the lookup table you have completed to encode the song, replacing repeated words with the number representing
their position in the table.
Encryption
Encryption allows data to be kept secret and secure so no one else can make
use of it.
A key is used to encrypt plain text into meaningless cipher text, the same key
is used to decrypt the data back into its original form. Only someone who
knows the key can decrypt the cipher. If you don’t have the key you need to
crack the code.
Activity 16
Decrypt this message:
KH WUHDVXUH LV KLGGHQ
XQGHU WKH SDOP WUHH EH TUEDVXUE LV KLGGEQ XQGEU TKE SDOP TUEE
Hint: H = E and W = T
Caesar Cipher
Activity 17
Question Answer