Data Representation
Data Representation
RAZA
97 – 5C – E1
(a) Show what the binary register stores for each pair of the given digits.
97
5C
E1
[6]
Example 1 .................................................................................................................................
...................................................................................................................................................
Example 2 .................................................................................................................................
................................................................................................................................................... [2]
(a) She uses the hexadecimal colour code #D2E3F5 as the background colour for her website. The
colour code is stored in two 12-bit binary registers. Show how the code would be stored in the
registers.
D2E
3F5
[6]
March 2019 Paper 12, question 3(a)/0478
(a) A long distance running race uses an electronic counter that counts each competitor who finishes the
race.
A denary value of the count is displayed on a screen above the finish line.
0 0 1 1 0 1 0 0
0 0 0 1 1 0 1 0
The contents of the register shown at the start of question 4 are shifted two places to the left.
Show the contents of the register after this shift has taken place.
[1]
(c) State the effect this shift has on the denary value in part (a).
...................................................................................................................................................
............................................................................................................................................. [1]
(c) The library has a website that customers can use to search for a book.
(i) The website has a background colour with the hexadecimal colour code #F92A10
The colour code is stored in two 12-bit binary registers.
Show how the colour code would be stored in the registers.
F92
A10
[6]
March 2020 Paper 12, question 5
5 Programmers can use denary and hexadecimal values. These values are stored in a computer system
using binary.
(a) Explain why binary is used to store data in a computer system.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................
[2]
(b)Complete the table to show how the denary value would be stored as binary in an 8-bit
register.
[3]
1 ................................................................................................................................................
2................................................................................................................................................ [2]
(i) Give the 8-bit binary value of the two denary values:
180 ....................................................................................................................................
Working space
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
10010011 ...........................................................................................................................
00011101 ........................................................................................................................... [2]
(i) 000000001100
..................................................................................................................................... [1]
(ii) 000011000110
..................................................................................................................................... [1]
(iii) 010011000001
..................................................................................................................................... [1]
Working space
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
(a)The first three hexadecimal values he reads are 15, 102 and A9.
15..............................................................................................................................................
102 ...........................................................................................................................................
A9 ............................................................................................................................................. [3]
Working space
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
(c) Pradeep has two 8-bit binary values that he needs to convert to hexadecimal values for his
project.
Give the hexadecimal values for the two 8-bit binary values.
(d) 01010000
.................................................................................................................................. 00111101
.................................................................................................................................. [4]
(a) Complete the binary register for these two pairs of digits.
97
5C
[4]
(b) Describe what is meant by a MAC address.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [4]
(c) Give two other uses of hexadecimal in computer science.
1................................................................................................................................................
2........................................................................................................................................... [2]
0 1 0 1 0 0 1 0
(i) A logical left shift of two places is performed on the binary value. Complete the binary
register to show its contents after this logical left shift.
[1]
(ii) State one effect this logical shift has on the binary value.
...........................................................................................................................................
...................................................................................................................................... [1]
(e) Negative denary numbers can also be represented as binary using two’s complement. Complete
the binary register for the denary value −54.
Working space...........................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Register:
[2]
March 2019 Paper 12, question 1
1 (a) Elle has a file stored on her computer that is 20 MB in size. Jordan has a file that is 10GB in size.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [4]
5 Audrey wants to send a sound file to Nico using email. The file is too large to attach to an email so
Audrey decides to compress the file. She uses lossy compression to reduce the size of the sound
file.
(a) Describe how lossy compression reduces the size of the sound file.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [4]
(b) Nico asks Audrey why she used lossy compression rather than lossless.
(i) State one advantage Audrey could give of using lossy rather than lossless to compress the sound
file.
...........................................................................................................................................
..................................................................................................................................... [1]
(ii) State one disadvantage Nico could give of using lossy rather than lossless to compress the sound
file.
...........................................................................................................................................
..................................................................................................................................... [1]
9618/11/M/J/21
(i) Complete the following table to describe the two terms about graphics.
Term Description
...........................................................................................................................
Pixel ...........................................................................................................................
...........................................................................................................................
...........................................................................................................................
File header ...........................................................................................................................
...........................................................................................................................
[2]
(ii) The image is scanned with an image resolution of 1024 × 512 pixels, and a colour depth
of 8 bits per pixel.
Calculate an estimate for the file size, giving your answer in mebibytes. Show your
working.
Working .............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Answer .......................................... mebibytes
[3]
Identify one method of lossless compression that can be used to compress the image and
describe how the method will reduce the file size.
Description ................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[3]
Http://SirRazaAcademy.com Ch2 Data Representation 1
IGCSE / O-Level – Computer Science
COMPILED BY S.M.RAZA
(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.
..................................................................................................................................... [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.
Working .............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Subtract the denary number 10 from the two’s complement representation 00100011.
Working .............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[2]
(c) The finished logo is 500 pixels by 1000 pixels and uses 35 different colours.
Working .....................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Answer ......................................................................................................................................
[4]
9608/11 Jun 18 8c
1 0 0 0 0 1 1 1
.......................................................................................................................................[1]
.......................................................................................................................................[1]
(iii) The current contents of register X stores a two’s complement binary integer.
.......................................................................................................................................[1]
...................................................................................................................................................
...................................................................................................................................................
Explanation ...............................................................................................................................
...................................................................................................................................................
[2]
Http://SirRazaAcademy.com Ch2 Data Representation 4
(b) The computer also has bitmap software.
Pixel ...................................................................................................................................
..........................................................................................................................................
. Screen resolution
..............................................................................................................
...........................................................................................................................................
[2]
(ii) A picture has been drawn and is saved as a monochrome bitmap image.
....................................................................................................................................... [1]
(iii) A second picture has width 2048 pixels and height 512 pixels. It is saved as a 256-
colour image.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[3]
(iv) The actual bitmap file size will be larger than your calculated value.
State another data item that the bitmap file stores in addition to the pixel data.
...........................................................................................................................................
.......................................................................................................................................[1]
9608/11 Jun 17 4d
.......................................................................................................................................[2]
05 3F
Write the equivalent assembly language instruction, with the operand in denary.
.......................................................................................................................................[2]
9608/12 Jun 18 Q4
4 (a) The Accumulator is a register. The current contents of the Accumulator are:
1 1 0 1 1 0 1 1
....................................................................................................................................... [1]
....................................................................................................................................... [1]
(iii) The current contents of the Accumulator represent a two’s complement binary integer.
....................................................................................................................................... [1]
(ii) Explain the differences between the ASCII and Unicode character sets.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
....................................................................................................................................... [2]
Calculate the ASCII code in hexadecimal for ‘Z’. Show your working.
Working .............................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
Http://SirRazaAcademy.com Ch2 Data Representation 6
ASCII code in hexadecimal for ‘Z’ .....................................................................................
[2]
9608/12 Jun 18 Q5
5 A student has recorded a sound track for a short film.
(a) Explain how an analogue sound wave is sampled to convert it into digital format.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................... [3]
(b) Explain the effects of increasing the sampling resolution on the sound file.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................... [2]
(c) The original sound was sampled at 44.1 kHz. The sample rate is changed to 22.05 kHz.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................... [3]
...........................................................................................................................................
....................................................................................................................................... [1]
State how many bits are used to encode the data for one pixel.
....................................................................................................................................... [1]
(iii) A second picture has width 8192 pixels and height 256 pixels. It is saved as a 256-
colour bitmap.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
....................................................................................................................................... [3]
(iv) The actual bitmap file size will be larger than your calculated value as a bitmap file has
a file header.
State two items of data that are stored in the file header.
1 ........................................................................................................................................
2 .................................................................................................................................... [2]
1 1 0 0 0 0 0 1
.......................................................................................................................................[1]
.......................................................................................................................................[1]
(iii) The current contents of register H represent a two’s complement binary integer.
.......................................................................................................................................[1]
(iv) State why register H does not currently contain a Binary Coded Decimal (BCD).
...........................................................................................................................................
.......................................................................................................................................[1]
(a) State the minimum number of bits needed to represent each pixel in this image.
...............................................................................................................................................[1]
(b) Run-length encoding (RLE) is used to store the image with the following colour codes.
Colour Code
Black 1A
White 3B
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
State the minimum number of bits needed to represent each pixel in the 30-colour image.
State the purpose of the file header. Give two examples of the file header contents.
Purpose ....................................................................................................................................
...................................................................................................................................................
Example 1 .................................................................................................................................
...................................................................................................................................................
Example 2 .................................................................................................................................
...................................................................................................................................................
[3]