Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 28

A-Level - Computer Science - Paper 2

Revision for Data Representation


___________________________________
This document is designed to help you prepare for the End Unit
Assessment (EUA) and the Paper 2 of the final exam

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

The questions in this revision document are exam-like questions, you


should complete this revision document as thoroughly as possible to
familiarise with the questions, to recall and apply your knowledge.

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]

Q3. State the denary representation of the binary number 00010111.

Your answer: 23

[1 mark]

1
Q4. State the denary representation of the binary number 10010011.
Your answer:147

[1 mark]

Section 2 - Number Bases

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

Statement Tick one box

Hexadecimal generally uses more digits to represent a decimal


number than binary does

Binary numbers take up more space in a computer’s memory


than hexadecimal numbers

Any binary number can also be represented in hexadecimal 🗸

[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

it easier for programmers to spot errors and make corrections.

[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)

The denary number 12 3

The binary number 00001110 1

The hexadecimal number D 2

[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

Binary 101101001 (361) 3

Hexadecimal 30A (778) 1

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 nibbles (12 bits) 1

2 bytes (16 bits) 3

1 kilobyte (8000 bits) 4

[3 marks]

Q18. How many bits are there in 3 MB? You must show your working

Your answer: 3MB = 3000 KB, 3000KB = 3000KB = 3,000,000 bytes

3,000,000 x 8 = 24,000,000 bits

[2 marks]

Q19. How many bytes are there in 3 Mi (220)? You must show your working.

Your answer 3 MI = 3 x (2^20) = 3,145,728 Bytes

3,145,728 x 8 = 25,165,824 bits

[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

Your answer: 106954752 Bytes - 42800000 Bytes = 64154752 bytes


remaining

64,154,752 bytes / 8,200,000

= 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?

Your answer: (2^n) -1

[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]

Q28. Add the two binary numbers 01001011 + 10010110 + 00101110


Your answer:

[1 mark]

Q29. What do we call the Most Significant Bit - MSB - in the result of the addition in
Q28?
Your answer:

[1 mark]

Q30. Multiply the two unsigned binary numbers 1111 x 0011


Your answer:

[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]

2. The following is a floating-point representation of a number

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]

4. The two floating point numbers below are multiplied together.

A problem occurs as a result of the multiplication operation.

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]

Section 5 - Information Coding System

Q37. Every ASCII character is stored in a computer system as a bit pattern.


State the minimum number of bits required to represent any of the 128 different
characters used in ASCII

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

Character Decimal Value Binary value Hexadecimal value

[3 marks]
Q40. How many bits does Unicode use to encode characters

Your answer:

[1 mark]

Q41. State one advantage of using Unicode instead of using ASCII

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]

2. It is proposed that the communication system is modified so that:


● a majority voting system is used instead of the parity bit
● Unicode is used to encode the characters to be transmitted instead of
ASCII
Discuss the improvements that will occur in the communication system as a
result of these changes and any disadvantages that will result from them.

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.

Which one of the following images has the correct encoding?

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.

What is the resolution of the image in pixels?

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

Type of file compression Tick one box

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

Type of file compression Tick one box

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]

The Vernam cipher is an example of symmetric encryption. Explain what is meant by


the term ‘symetric key’

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]

Q58. Describe the term ‘identifying commonly used techniques’

Your answer:
[1 mark]

Q59. Describe the term ‘reverse engineering’

Your answer:

[1 mark]

26
Q60. Describe the term ‘dictionary attacks’

Your answer:

[1 mark]

(This is the end of the revision document)

27

You might also like