Cambridge Alevel
Candidate
Name
Student ID
Computer Science 9618
Session 2024-2025
Chapter 1 (Data Representation)
AS Level
INSTRUCTIONS
● Scan the Assignment using Adobe Scan or Cam Scanner or attempt the assignment digitally using ipad
or similar equipment
● Document to be submitted via Student Portal
● Write your Name and Student ID in the boxes at the top of the page.
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your answer to each question in the space provided.
● You may use a calculator.
● You should show all your working and use appropriate units.
INFORMATION
● The total mark for this paper is 68.
● The number of marks for each question or part question is shown in brackets [ ].
[Turn over
1
2
3
4
(c) One of the colours used in the image has the hexadecimal colour code:
#FC238A
FC is the amount of red, 23 is the amount of green and 8A is the amount of blue in the colour.
(i) Convert the hexadecimal code FC into denary.
..................................................................................................................................... [1]
(ii) The amount of green in binary is 00100011. This has the denary number 15 added to it
to create a second colour.
Add the denary number 15 to the binary number 00100011 and give your answer in
binary.
Perform the addition in binary. Show your working.
Working .............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Answer (in binary) ........................................
[3]
(iii) Hexadecimal 23 in two’s complement representation is 00100011. The denary number
10 needs to be subtracted from this value.
Subtract the denary number 10 from the two’s complement representation 00100011.
Give your answer in binary. Show your working.
Working .............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Answer (in binary) ........................................
[3]
5
6
(ii) Wilbur wants to compress the scanned image before emailing it to his colleague.
Describe one lossy compression technique that Wilbur can use to compress this image.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [3]
7
8
(b) Character is another type of data.
The following tables show part of the ASCII code character set.
Character Denary value Character Denary value
A 65 a 97
B 66 b 98
C 67 c 99
D 68 d 100
E 69 e 101
(i) Describe how the computer uses ASCII codes to represent characters.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
(ii) Convert the following string into ASCII codes.
Bed
...........................................................................................................................................
..................................................................................................................................... [1]
(iii) Give the denary ASCII code for the following character.
..................................................................................................................................... [1]
9
10
(d) The hexadecimal colour value of the background of Xiaoming’s website is:
913C8E
Complete the following table by converting each hexadecimal value to denary value.
Red Green Blue
Hexadecimal value 91 3C 8E
Denary value
[2]
11
12
(ii) Complete the table by writing the ASCII denary value for the character ‘t’ and its
hexadecimal equivalent.
Character t
ASCII denary value
Hexadecimal value
[2]
13