Data Representation Computing Worksheet-2
Data Representation Computing Worksheet-2
Subject Code:9618
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]
(b) The image is compressed using lossless compression.
Identify one method of lossless compression that can be used to compress the image and
describe how the
method will reduce the file size.
Lossless compression method................................................................................
Description .......................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
............................ [3]
(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]
Working.............................................................................................................................................
................
..........................................................................................................................................................
...............
..........................................................................................................................................................
...............
..........................................................................................................................................................
..............
..........................................................................................................................................................
..............
................................................................
……………………………………………………………………………………………….
..........................................................................................................................................................
........
.............................................................................................................................................
………………..[1]
(b) Convert the signed denary value –100 into an 8-bit two’s complement binary integer.
Working
..........................................................................................................................................................
......
..........................................................................................................................................................
......
Answer ............................................................................
[1]
Working.............................................................................................................................................
.............
..........................................................................................................................................................
............
..........................................................................................................................................................
............
..........................................................................................................................................................
...........
Answer ............................................................................
[2]
…………………………………………………………………………………………………………………………………
………
…………………………………………………………………………………………………………………………………
………
……………………………………………………………………………………………..
[3]
(ii) Calculate an estimate for the file size of the section of the bitmap image shown, giving
your answer in bytes.
(iii) Use your answer from part (b)
(i). Show your working.
Working.......................................................................................................................
..........................................................................................................................................................
........
..........................................................................................................................................................
.......
..........................................................................................................................................................
......
..........................................................................................................................................................
......
Convert the denary numbers 127 and 12 to 8-bit binary and then perform the subtraction 12 −
127 in binary.
Show your working.
127 in
binary ...........................................................................................................................................
.
12 in
binary ...........................................................................................................................................
...
12 − 127 in
binary .....................................................................................................................................
..........................................................................................................................................................
......
..........................................................................................................................................................
......
..........................................................................................................................................................
......
.................................................................................................................................................
[3]
Describe how lossless compression can be used to reduce the file size of a text file.
..........................................................................................................................................................
.........
..........................................................................................................................................................
........
..........................................................................................................................................................
........
..........................................................................................................................................................
........
..........................................................................................................................................................
........
..........................................................................................................................................................
...... [2]
(iv) Explain why lossy compression should not be used on a text file.
..........................................................................................................................................................
.........
..........................................................................................................................................................
.........
..........................................................................................................................................................
.........
..........................................................................................................................................................
.........
..........................................................................................................................................................
.........
..........................................................................................................................................................
.........
..........................................................................................................................................................
... [2]