Professional Documents
Culture Documents
A-Level - Computer Science - Paper 2: Revision For Data Representation
A-Level - Computer Science - Paper 2: Revision For Data Representation
It is recommended that you revise the contents using the Learning Platform
and the Knowledge Organisers prior to completing this document
You may want to complete this revision document one section at a time to
maximise learning
Happy revision!
Section 1 - Number Systems
Q1. State the binary representation of the denary number 87. You must show your
working.
Your answer:
128 64 32 16 8 4 2 1
0 1 0 1 0 1 11 = 01010111
[2 marks]
Q2. State the binary representation of the denary number 237. You must show your
working.
Your answer:
128 64 32 16 8 4 2 1
1 1 1 0 1 1 0 1 = 11101101
[2 marks]
Your answer: 23
[1 mark]
1
Q4. State the denary representation of the binary number 10010011.
Your answer:147
[1 mark]
Q5. State the binary representation of the hexadecimal number CE. You must show
your working.
Your answer: 11001110
[2 marks]
Q6. State the binary representation of the hexadecimal number 2D. You must show
your working.
Your answer: 101101
[2 marks]
Q7. State the hexadecimal representation of the binary number 10011110. You must
show your working.
Your answer: 9E
[2 marks]
2
Q8. State the hexadecimal representation of the binary number 11011001. You must
show your working.
Your answer:D9
[2 marks]
Q9. State the decimal representation of the hexadecimal number 3E. You must show
your working.
Your answer: 62
[2 marks]
Q10. State the decimal representation of the hexadecimal number 66. You must show
your working.
Your answer: 6 x 16 + 6x1 = 102
[2 marks]
Q11. State the hexadecimal representation of the decimal number 72. You must show
your working.
Your answer: 16 x 7 + (1x2) = 114
[2 marks]
3
Q12. State the hexadecimal representation of the decimal number 125. You must
show your working.
Your answer: 125 = 01111101
[2 marks]
Q13. Tick one box to indicate the statement that is true about hexadecimal and binary
numbers in Table 1
Table 1
[1 mark]
4
Q14. Explain why programmers prefer to use hexadecimal than binary?
Your answer: hexadecimal is much easier to read and understand than binary making
[2 marks]
Q15. Place the three numbers in Table 2 in order of size (1–3 where 1 is the largest and
3 is the smallest).
Table 2
Number Order (1 to 3)
[1 mark]
Q16. Table 3 depicts three values in binary, hexadecimal and decimal. Rank them from
1 the largest to 3 the lowest value.
Table 3
Number base Number Largest value
Decimal 396 2
[3 marks]
5
Section 3 - Units of Information
Q17. Place the following quantities in Table 5 in order of size (total number of bits), (1 –
4, where 1 is the smallest and 4 is the largest)
Table 5
Quantity Order (1 - 4)
15 bits 2
[3 marks]
Q18. How many bits are there in 3 MB? You must show your working
[2 marks]
Q19. How many bytes are there in 3 Mi (220)? You must show your working.
[2 marks]
6
Q20. The amount of memory available in RAM on Olivia’s computer is 102Mi. Olivia is
loading an image editor with a file size of 42.8 MB. Using the image editor, she wants to
open a number of photos with a file size of 8200 KB each. How many images can Olivia
upload to RAM before it gets full? You must show your working.
Note:
1KB = 0.97 Ki
1MB = 0.95 Mi
= 7.8237502439 photos
[2 marks]
Q21. If Olivia were to load more images with a shortage of RAM, what will the
Operating System - OS - need to do to ensure the computer continues to run? Explain
your answer.
Your answer:
[2 marks]
7
Section 4 - Binary Number System
Q22. What do unsigned binary numbers represent?
Your answer: positive integers
[1 mark]
Q23. What is the range of values of unsigned binary for a given number of bits, n?
[1 mark]
Q24. Convert the following integer 10011110 from two’s complement binary to decimal
Your answer:
[1 mark]
Q25. Convert the following integer from decimal -101 to two’s complement binary
Your answer: -101:
-128 64 32 16 8 4 2 1
1 0 0 1 1011 = 10011011
[1 mark]
Q26. Convert the following integer from decimal -151 to two’s complement binary
Your answer:
[1 mark]
8
9
Q27. Add the two binary numbers 01001011 + 10010110
Your answer:
[1 mark]
[1 mark]
Q29. What do we call the Most Significant Bit - MSB - in the result of the addition in
Q28?
Your answer:
[1 mark]
[1 mark]
Q31. Subtract the two’s complement B from A, you must show your working.
A = 1110
B = 0110
Your answer:
[2 marks]
10
Q31. State the range of integers in 8-bit two’s complement.
Your answer:
[1 mark]
Q33. State the decimal representation of the signed binary number 11100.010 2
Your answer:
[1 mark]
Q34. State the decimal representation of the unsigned binary number 101010.111 2
Your answer:
[1 mark]
11
Q35. The following questions use a normalised floating point representation with an 8-
bit mantissa, both stored using two’s complement
1. Write the smallest positive number that can be represented by the floating point
system in the boxes below
Your answer:
[2 marks]
Calculate the decimal equivalent of the number. You must show your working.
Your answer:
[2 marks]
12
3. Write the normalised floating-point representation of the decimal value 0.15625
(5/32 as a fraction) in the boxes below. You must show your working
Your answer:
[3 marks]
Explain what problem has occurred and how the floating-point representation
could be redesigned to avoid it.
Your answer:
[3 marks]
13
Q36. Fixed point and floating point are two methods for representing values. Compare
the two methods highlighting their advantages and disadvantages.
Your answer:
Fixed point
Floating point
[1 mark]
Your answer:
[1 mark]
Q38. State the minimum number of bits required to represent any of the 256 different
characters used in the extended ASCII.
Your answer:
[1 mark]
14
Q39. The character-encoding system ASCII uses 7 bits to represent each character
and symbol of the English alphabet.
For example, the character a is represented as 1100001 in binary, 97 in decimal and 61
in hexadecimal.
Complete Table 4
Table 4
[3 marks]
Q40. How many bits does Unicode use to encode characters
Your answer:
[1 mark]
Your answer:
[1 mark]
15
Q42. A data communication system uses asynchronous serial communication.
The ASCII code for the digit ‘0’ is 48 in decimal. In ASCII, other digits follow on from this
value in sequence.
1. The digit ‘4’ is to be transmitted in ASCII using asynchronous serial transmission
and even parity, with the parity bit stored in the most significant bit of the byte of
data containing the ASCII code.
Write a valid bit pattern for transmitting the digit ‘4’.
Your answer:
[3 marks]
Your answer:
[4 marks]
16
Section 6 - Representing Images, Sound and Other Data
Image Representation
Q43. The following grid represents a bitmap image where a black pixel is represented
using the bit pattern 00 and a white pixel is represented using the bit pattern 01. The
binary encoding of each row is shown next to the image.
Your answer:
[1 mark]
17
Q44. State the maximum number of different colours that can be encoded when using 2
bits for each pixel.
Your answer:
[1 mark]
Q45. The image below has a size of 5284 pixels in width and 3888 pixels in height.
Your answer:
[1 mark]
18
Q46. The colour depth is 24 bits per pixel (bpp).
Calculate the size of the file in:
● Bits:
● Bytes:
● Kilobytes:
● Megabytes:
[4 marks]
Q47. A student is planning a piece of digital artwork and is unsure about whether to
use a vector or bitmap format.
1. State three pieces of data that might be stored in a vector graphic file
Your answer:
[3 marks]
2. Describe one common use of vector graphics and one common use of common
use of bitmap images.
Vector graphic
Your answer:
Bitmap images
Your answer:
[3 marks]
19
Sound Representation
Q48. A researcher is recording a 30-second audio file that will be played to dogs, who
can hear sounds up to 60kHz.
1. State the minimum sample rate that should be used for the audio file. Justify your
answer.
Your answer:
2. The researcher chooses to record the audio at a sample rate of 100kHz, with a
bit depth of 12 bits per sample. Calculate the file size of the recording (you must
show your working)
Your answer:
3. Describe the impact on the quality of file size of the audio recording for choosing
a bit depth of 24 bits per sample.
Your answer:
[6 marks]
Q49. A musician is composing a new piece of music and is unsure whether to store it as
a MIDI file or a sampled audio file.
State three items of data that would be stored about each note in a MIDI file.
Your answer:
[3 marks]
20
Data Compression
Q50. JPEG - Joint Photographic Experts Group - is a commonly used method of lossy
compression for digital images, particularly for those images produced by digital
photography. What is the purpose of compressing images?
Your answer:
[2 marks]
Q51. The image has been compressed, but some information has been lost in the
process and will not be restored when decompressing the image. Tick the type of
compression that has been used in Table 6
Table 6
Lossy
Lossless
[1 mark]
Q52. What is the type of compression that offers a greater reduction of the file size?
Tick the type of compression in Table 7
Table 7
Lossy
Lossless
[1 mark]
21
Q53. Two sections of a DNA sequence are shown in Figure 1
Figure 1
CCCCCCCCCEEEEE ABCDDDEEABCDDDEEABCDDDEEABCDDDEE
1. Describe, with example, how the Run Length Encoding (RLE) could be used to
reduce the file size needed to store the first sequence.
Your answer:
[3 marks]
2. Describe how the dictionary compression method could be used to reduce the
size of the file needed to store the second sequence
Your answer:
[3 marks]
22
Data Encryption
Q54. Figure 2 depicts a cipher wheel used to encrypt simple text messages. The outer
wheel contains the plaintext and the inner wheel contains the ciphertext equivalent.
Figure 2
1. Encrypt the string PEER TO PEER NETWORK using the Caesar cipher with the
cipher wheel in Figure 2
Your answer:
2. Decrypt the cipher FOLHQW VHUYHU QHWZRUN using the Caesar cipher with
the cipher wheel in Figure 2
Your answer:
23
3. Describe how the ‘brute force’ technique could be used to crack the Caesar
cipher given a ciphertext message but without the key
Your answer:
[2 marks]
4. Describe how the ‘frequency analysis’ technique could be used to crack the
Caesar cipher given a ciphertext message but without the key
Your answer:
[2 marks]
Q55. Table 8 depicts the binary representation, using 8-bit ASCII, for the first five letters
of the alphabet
Table 8
Letter ASCII
A 0100 0001
B 0100 0010
C 0100 0011
D 0100 0100
E 0100 0101
State the result of applying an XOR to the binary messages ‘0100 0011’ and ‘1100
1010’
Your answer:
24
Using the key ‘1010 0111 0101 1011 1001 0110’, encrypt the message ‘BAD’ using
the Vernam cipher in Table 9. You must show your working
Table 9
B A D
Plaintext in ASCII
Key
Bitwise XOR
[2 marks]
State three requirements for the Vernam cipher key that are required to keep the
plaintext message completely secure
Your answer:
[3 marks]
Explain why the Vernam cipher is considered as a cypher with perfect security.
Your answer:
[1 mark]
Your answer:
[1 mark]
25
Q56. A message is to be transmitted from computer A to Computer B. The message will
be encrypted using asymmetric encryption. To enable computer B to authenticate that
the message was sent by computer A, a digital signature will also be sent with the
message.
Explain how computer B will decrypt the message and verify that it was sent by
computer A.
In your response, you should refer to the specific keys that will be used in this process.
You do not need to explain how computer A will encrypt the message or create the
digital signature.
Your answer:
[4 marks]
Q57. Compare Vernam cipher with ciphers that depend on computational security
Your answer:
[2 marks]
Your answer:
[1 mark]
Your answer:
[1 mark]
26
Q60. Describe the term ‘dictionary attacks’
Your answer:
[1 mark]
27