GCSE COMPUTER SCIENCE Data Analogue Data Compression and
- Slides: 30
GCSE COMPUTER SCIENCE 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) kilobyte (KB) megabyte (MB) gigabyte (GB) terabyte (TB) x 8 x 1024
Activity 1 Use a calculator to calculate the number of bytes. Number of bytes 1 kilobyte (KB) = 1024 bytes 1 megabyte (MB) = 1024 kilobytes 1 gigabyte (GB) = 1024 megabytes 1 terabyte(TB) = 1024 gigabytes
Analogue Data Analogue data is continuous, allowing for an infinite number of possible values. Digital data is discrete, it has a limited set of values. To be handled by a computer, analogue data has to be converted to digital (or digitised).
Sound The process of digitising sound is known as sampling. Sampling an analogue sound wave involves taking samples at evenly spaced time intervals and representing the samples as numerical values. 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: Sampling Rate (in Hz) x bit depth (in bits) x channels x duration in seconds
Calculating Bit Depth You can calculate the bit depth of a sound using the following formula: File Size (in bits) / Sampling Rate (in Hz) x channels x time (in seconds)
Activity 2 Question Describe the process of converting analogue sound waves into digital data. What is the difference between analogue and digital data? What is meant by the term ‘sampling rate’? What is meant by the term ‘bit depth’? Answer
Activity 3 Use internet research to help you complete this table: Question What is the sampling rate for CD audio? Give your answer in k. Hz. In the context of digital sound, what is meant by the term ‘bit depth’? How many bits per sample are used for CD audio? What about DVD audio? Answer
Activity 4 Use internet research to help you complete this table: Question Is a high frequency sound high or low pitched? What is the highest frequency the human ear can detect? Why do most sound recordings have two channels? Answer
Activity 5 Question Calculate the file size of a CD quality, stereo sound track that is 2. 5 minutes long. Give your answer in megabytes to 1 decimal place. Calculate the bit depth of a 10. 3 MB, 3 minute, stereo sound track, with a sampling rate of 30 k. Hz. 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? Answer
Compression is the process of reducing the size of a file. It allows us to reduce the amount of storage space we use and to speed up the transfer of files over networks. There are three types of 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 three strategies for compressing data in your own words: Lossless Lossy 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. Lossless Lossy Superchannel
Practical Activity You are going to compress three different text files to see what happens. Save these files to your area. 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. File A 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? Explain why. File B File C
Run Length Encoding
Activity 9 Question Describe how the RLE compression algorithm works. Answer
Activity 10 In the table below, the image is encoded in binary. The first binary pair represents a colour (00 = blue, 01 = white, 10 = yellow, 11 = green) and the second binary number represents the run length of the colour. So, for example, 00, 1101 represents blue, 13 pixels. Shade the squares (pixels) in the table to recreate the image. 00 0110 10 00 0100 10 0001 00 0101 10 00 0100 10 00 0001 00 0101 11 00 0011 10 00 0001 00 0011 11 0110 00 0001 10 0011 00 0001 00 0010 11 0010 01 0001 11 0101 10 0011 00 0001 11 1001 10 0011 00 0001 00 0010 11 1000 10 0011 00 0001 00 0011 11 0110 00 0001 10 0011 00 0001 00 0101 11 00 0011 10 00 0001 00 0101 10 00 0100 10 00 0001 00 0110 10 00 0100 10 0001 00 0001
Activity 11 Use the Run Length Encoding Calculator to encode these text strings. Text string AAAABBBBBCADDDDEEFFFF ABCABCABCABCABCS BBGGYYAACCFFEE Which one compresses the most? Why is this? Describe in English the process the RLE calculator follows to encode a piece of text. Answer
Activity 12 Answer the questions below based on this text: The wheels on the bus go round and round, round and round. The wheels on the bus go round and round all day long. How many characters, including spaces and punctuation marks, are there in this song? Assuming one byte is used to represent each character, what is its file size?
Activity 13 Complete this table: Word Number of times used Number of bytes in word The 2 3 wheels 2 6 on 2 2 the 2 3 bus go round all day long
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 5 6 7
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 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: Message KH WUHDVXUH LV KLGGHQ XQGHU WKH SDOP WUHH Hint: H = E and W = T Decrypted Message
Caesar Cipher
Activity 17 Question Explain how the Caesar cipher works. Answer
Activity 18 Use this Caesar cipher wheel to decode and encode these messages. Plain text Shift THE ENIGMA MACHINE WAS INVENTED BY THE GERMANS +3 COLOSSUS WAS THE WORLD’S FIRST DIGITAL COMPUTER +4 Encrypted text +5 YMJ HFJXFW HNUMJW NX FS JCFRUQJ TK WTRFS NSLJSZNYD -3 QEB HBV FP EFAABK RKABO QEB CILTBO MLQ
- Compression computer science
- Analog and digital signals in computer networking
- Analog vs digital
- Analogue and digital electronics
- Analogue and digital images
- Wjec gcse computer science
- Hardware gcse computer science
- Ocr gcse computer science algorithm questions
- Computational thinking gcse
- Gcse computer science paper 2
- Rotational analogue
- Adc types
- Analogue time examples
- Analogue door phone
- Analogue studies are used when researchers ____.
- Visual analogue mood scale
- Analogue chapter 3
- Status digital analogue
- Data compression in data mining
- My favourite subject worksheet
- What is lossy data compression
- Image compression
- Huffman coding tree visualization
- Uniquely decodable code in data compression
- Locoi
- Audio compression test
- Introduction to data compression
- What is data compression in multimedia
- Jpeg: still image data compression standard
- Jpeg still image data compression standard
- Gcse grades