Thursday, 11 December 2014

Theory Lesson 1 Compression and encryption

Lesson One

In this lesson you will learn to:
  • Explain the representation of an image as a series of pixels
  • Explain the compression of text in a file
Activity 1.1 (20 minutes)

1. Go to Student Shared / Creative Technologies / GCSE Computing and examine the three files A, B and C
2. In your books answer the following questions:



File A
File B
File C
How many characters does the file contain?

  

What type of content does the file contain?



What is its file size before compression?



What is its file size after compression?



What is its compression ratio (decompressed size/compressed file size)?




Which file compresses the most?  



Activity 1.2 20 Minutes
Look at the binary numbers below. The first pair of binary numbers represents a colour code as follows:
00 = blue
01 = white
10 = yellow
11 = green

The second set of binary numbers represents the run length of the colour. So, for example, 00, 1101 represents 13 blue pixels.
Assuming each of the squares in the grid below represents one pixel, follow the series of binary numbers and shade the squares. The first line of pixels has been done for you.
Line 1: 00 0001 01 0011 00 1100

To obtain a grid either copy and past the grid below into a google.doc or go to the following link:

https://docs.google.com/document/d/1ZD1byDk4jHAvB3VtQ3AaRj1_g1DkleA8dRfZKRJgZQE/edit
Line 1
00 0001 01 0011 00 1100
Line 2
00 0001 01 0011 00 1100
Line 3
00 0001 01 0011 00 0100 10 0010 00 0100 10 0001 00 0001
Line 4
00 0111 10 0010 00 0100 10 0010 00 0001
Line 5
01 0010 00 0101 11 0011 00 0011 10 0010 00 0001
Line 6
01 0010 00 0011 11 0110 00 0001 10 0011 00 0001
Line 7
00 0100 11 0010 01 0001 11 0101 10 0011 00 0001
Line 8
00 0001 01 0001 00 0001 11 1001 10 0011 00 0001
Line 9
00 0011 11 1001 10 0011 00 0001
Line 10
00 0001 01 0001 00 0010 11 1000 10 0011 00 0001
Line 11
00 0101 11 0110 00 0001 10 0011 00 0001
Line 12
00 0111 11 0011 00 0011 10 0010 00 0001
Line 13
00 0001 11 0001 00 0010 11 0001 00 0010 10 0010 00 0100 10 0010 00 0001
Line 14
00 0001 11 0001 00 0001 11 0001 00 0100 10 0010 00 0100 10 0001 00 0001
Line 15
00 0010 11 0001 00 1101
Line 16
10 10000