Skip to content

1.3.1 Compression, Encryption and Hashing Exam Questions

Paper 1 · Computer Systems · 12 past paper questions · 50 marks

Exam questions for 1.3.1 Compression, encryption and hashing

12 OCR past paper questions (50 marks) with mark schemes

Answer each question, reveal the mark scheme, then award yourself marks. Scores and answers are saved in this browser so you can see which topics need more work.

Download Questions & Mark Scheme (PDF)

Past paper questions

  1. Question 1H446/01 · June 20243 marks

    The thin client computer needs to send data that is input by the user to the server so that the virtual machine can process it. Data is compressed in order to improve the speed of data transmission between the client and the server. Explain why lossless compression should be used instead of lossy compression.

    Show mark scheme
    Lossless will not permanently remove data Lossless can be fully reconstructed/restored Quality (of text/graphics/sound) is not lost Any loss of text would be noticeable/would make it unreadable/unusable Lossless rewrites data in a more efficient format (3 marks - 1 per bullet, max 3)
    Mark yourself: how many marks did you get?
    / 3
  2. Question 2H446/01 · June 20239 marks

    A team of programmers create a robot that will be used in a factory. The robot stores data internally and also communicates with other robots and users via a wireless network which is password protected. All data for these tasks is secured using either encryption or hashing. Compare the robot's use of encryption and hashing for storing and communicating data. You should include: the different types of encryption that could be used and how this would secure data, how hashing could be used to secure data and which data would be suitable, why encryption and hashing are used by the robot for stored data and communications.

    Show mark scheme
    Levels of response question (9 marks) AO1: Encryption converts data into ciphertext using a key. Symmetric encryption uses same key for encryption and decryption. Asymmetric encryption uses two keys, one for encryption, one for decryption. Encryption is two-way, data can be restored. Hashing is a one-way mathematical process that produces a value from input. AO2: For robot's data storage, symmetric encryption useful as no keys to share. For robot-robot/user communication, asymmetric encryption means only public key needs to be shared. Data can be encrypted/decrypted while private key is kept secure. Hashing useful for information (e.g. password) that needs to be verified but does not need to be known. AO3: Encryption useful for most data storage as hackers cannot read data. Hashing useful for password storage. Hashing not useful for data that needs to be returned to user. Encryption useful for data transmission as intercepted data cannot be decrypted without key.
    Mark yourself: how many marks did you get?
    / 9
  3. Question 3H446/01 · June 20225 marks

    All videos that are streamed are compressed. Customers have the option to choose from watching the videos with lossy compression or lossless compression. Explain how this choice will impact the customer.

    Show mark scheme
    Lossy permanently removes data Lossless rewrites original data in more efficient format Lossless is able to recreate the original file // Lossy is not able to recreate the original file Lossy reduces quality of videos // Lossless keeps original quality Lossy file size is smaller than if lossless were used Lossy: compression ratio may be adjusted depending on bandwidth Lossy: the video will buffer less / quicker to start watching Lossless: the video will buffer more / slower to start watching (5 marks - 1 per valid point, max 5)
    Mark yourself: how many marks did you get?
    / 5
  4. Question 4H446/011 mark

    Photographs on a webpage are usually compressed. State which method of compression is most likely to be used for this purpose.

    Show mark scheme
    Lossy (1 mark)
    Mark yourself: how many marks did you get?
    / 1
  5. Question 5H446/012 marks

    Explain the need to compress photographs in this situation.

    Show mark scheme
    Reduces the size of the image file Uses lower bandwidth in transmission Takes up less storage (on the HTTP server) (2 marks - 1 per bullet)
    Mark yourself: how many marks did you get?
    / 2
  6. Question 6H446/01 · June 20191 mark

    State what is meant by the term 'compression'.

    Show mark scheme
    (The process of) making a file smaller/take up less storage (1 mark)
    Mark yourself: how many marks did you get?
    / 1
  7. Question 7H446/01 · June 20192 marks

    It is decided that Run Length Encoding will be used. The following sequence has been compressed using Run Length Encoding. 3C3M4C Show the result of decompressing the sequence.

    Show mark scheme
    CCCMMMCCCC (2 marks - correct answer)
    Mark yourself: how many marks did you get?
    / 2
  8. Question 8H446/01 · June 20193 marks

    Show the result of using Run Length Encoding to compress the sequence: CCCCOLLLCCCCCMOCCCCC

    Show mark scheme
    4C1O3L5C1M1O5C (3 marks - correct answer, accept without 1s)
    Mark yourself: how many marks did you get?
    / 3
  9. Question 9H446/01 · June 20189 marks

    Discuss the impact of modern encryption on society. You should refer to: The importance of asymmetric encryption and how it differs from symmetric encryption, Different circumstances in which symmetric and asymmetric encryption may be used.

    Show mark scheme
    Levels of response question (9 marks) AO1: Modern encryption is many orders stronger than pre-computer era. Asymmetric encryption uses different keys for encryption and decryption. Symmetric encryption uses same key for encryption and decryption. Asymmetric algorithms tend to involve more processing than symmetric. AO2: Modern encryption can be used without specialist knowledge. Users may not even be aware their data is being encrypted (e.g. HTTPS, messaging). Asymmetric encryption often used when exchanging data (e.g. credit card details over internet). Symmetric encryption best suited when same person is encrypting and decrypting (e.g. backing up data). AO3: Strength and ease of use has made encryption widely used on Internet. E-Commerce would not be possible without it. Governments are no longer able to easily crack encrypted messages. This gives individuals unprecedented levels of privacy but also means those communicating for nefarious purposes can do so undetected.
    Mark yourself: how many marks did you get?
    / 9
  10. Question 10H446/01 · June 20171 mark

    Describe what is meant by the term 'hash'.

    Show mark scheme
    A result generated by applying an algorithm / numeric process to a value (1 mark)
    Mark yourself: how many marks did you get?
    / 1
  11. Question 11H446/01 · June 20172 marks

    Describe one advantage to storing the password as a hash.

    Show mark scheme
    Hash functions are one way / can't be reversed (1) If someone gains access to the database they cannot access user's password (1) (2 marks)
    Mark yourself: how many marks did you get?
    / 2
  12. Question 12H446/0112 marks

    Discuss the two compression methods (Run Length Encoding and Dictionary Encoding) and justify which you would recommend for compressing Shakespeare's works.

    Show mark scheme
    Levels of response question (12 marks) AO1: Run length encoding relies on consecutive pieces of data being the same. Each set of consecutive symbols can be represented by the symbol and its number of occurrences. In dictionary encoding frequently occurring pieces of data are replaced by symbols/tokens. A dictionary is used to match tokens with original groups of characters. AO2: Run Length Encoding is very unsuitable for the example text. There are very few consecutive repeating symbols. Dictionary encoding is well suited. There are lots of repeating groups of characters (e.g. 'call', 'name', 'Romeo'). AO3: Run length encoding is not suited to natural language (more likely to be used in simple images). Applying it to the example would result in text same size as original or worse. Dictionary encoding works well. Would fare substantially better on full works. Dictionary encoding is the best compression method for this scenario.
    Mark yourself: how many marks did you get?
    / 12
Key Exam Tips for 1.3.1
  • 1Compression: Lossy (JPEG, MP3 - removes data) vs Lossless (ZIP, PNG - perfect reconstruction)
  • 2Symmetric encryption: Same key for encrypt/decrypt, fast, key distribution problem
  • 3Asymmetric encryption: Public/private key pair, solves distribution, slower
  • 4Hashing: One-way, deterministic, avalanche effect; Used for passwords and integrity
General Exam Advice
  • •Practice answering questions under timed conditions
  • •Check your answers against the mark scheme carefully
  • •Focus on understanding the marking points, not just memorising answers
  • •Review past paper questions from multiple years to spot patterns