By David Watson PDF Data Compression
By David Watson PDF Data Compression
This document provides answers to exam-style questions and activities from the Cambridge IGCSE and O
Level Computer Science Student's Book. It includes answers related to data representation… Full description
AI-enhanced description
1 Data representation
Answers to activities
1.1
a 51
b 127
c 153
d 116
e 255
f 15
g 143
h 179
i 112
j 238
k 487
l 1364
m 3855
n 1992
o 2047
p 31984
q 16141
r 49983
s 34952
t 32767
1.2
a 00101001
b 01000011
c 01010110
d 01100100
e 01101111
f 01111111
g 10010000
h 10111101
i 11001000
j 11111111
k 1000000011101000
l 0000001101111000
m 0000111111111111
n 0100000000010000
o 1111001101100011
1.3
a C3
b F7
c 27F
d 4EE
e 1E1
f 89E
g (0)4FE
h (0)E9C
i FF7D
j 67AE
1.4
a 0110 1100
b 0101 1001
c 1010 1010
d 1010 0000 0000
e 0100 0000 1110
f 1011 1010 0110
g 1001 1100 1100
h 0100 0000 1010 1010
i 1101 1010 0100 0111
j 0001 1010 1011 0000
1.5
a 107
b 156
c 74
d 255
e 511
f 2561
g 2996
h 3240
i 4782
j 44425
1.6
a 62
b E3
c 1EA
d 1FF
e 33A
f 3E8
g A4A
h E9F
i FA7
j 1388
1.7
1 Student investigation
2 a 35, 37, 8B
b C9, 7A, CC
c C, 6F, 51
1.8
a 10000011
b 01100110
c 01111011
d 10110110
e 01101111
f 10110111
g 01111110
h 01110000
i 11111110
j 11011101
1.9
a 98 = 01100010 and 15 = 00001111; sum = 01110001 (= 113)
b 29 = 00011101 and 88 = 01011000; sum = 01110101 (= 117)
c 49 = 00110001 and 100 = 01100100; sum = 10010101 (= 149)
d 51 = 00110011 and 171 = 10101011; sum = 11011110 (= 222)
e 82 = 01010010 and 69 = 01000101; sum = 10010111 (= 151)
f 100 = 01100100 and 140 = 10001100; sum = 11110000 (= 240)
g 19 = 00010011 and 139 = 10001011; sum = 10011110 (= 158)
h 203 = 11001011 and 30 = 00011110; sum = 11101001 (= 233)
i 66 = 01000010 and 166 = 10100110; sum = 11101000 (= 232)
j 211 = 11010011 and 35 = 00100011; sum = 11110110 (= 246)
1.10
1 a 89 = 01011001 and 175 = 10101111; sum = 1 00001000 (= 8)
overflow error has occurred (9 bits)
b 168 = 10101000 and 99 = 01100011; sum = 1 00001011 (= 11)
overflow error has occurred (9 bits)
c 88 = 01011000 and 215 = 11010111; sum = 1 00101111 (= 47)
overflow error has occurred (9 bits)
2 a 1101 1111 0010 1010 – result is correct
b 1 1110 1011 1110 0100 – overflow error has occurred
1.11
1 a denary value = 64 + 32 + 8 = 104
0 0 0 0 1 1 0 1
b denary value is 13 (104 ÷ 8) therefore shift three places right is the same as division
by 23 (i.e. 8)
c denary value = 15
1 1 1 1 0 0 0 0
d denary value is 240 (15 × 16) therefore shift four places left is the same as multiplication
by 24 (i.e. 16)
2 a 29 = 00011101 and 51 = 00110011
b sum = 01010000
c 00001010
d 75 = 01001011
e 01010101
f 10101010
1.12
1 a 00100111
b 01000010
c 01011000
d 01100110
e 01101111
f 01111101
g 01001101
h 00010100
i 00110001
j 00111000
2 a 85
b 51
c 76
d 126
e 15
f 125
g 65
h 30
i 113
j 120
1.13
a 11101110
b 11100001
c 11010001
d 11000001
e 10101000
f 10100100
g 10011100
h 11111111
i 11110000
j 10000001
1.14
a −51
b −66
c −17
d −121
e −96
f −7
g −81
h −1
i −127
j −10
1.15
1 i The number of possible colours of a group of pixels (usually three or four) based on
the bit depth.
ii The coding system for all the characters on a standard keyboard and control codes;
extended ASCII, gives another 128 codes to allow for characters in non-English alphabets
and for some graphical characters to be included.
iii The coding system which represents all the languages of the world (the first 128 characters
are the same as ASCII code).
iv The number of sound samples taken per second.
v Images which are made up of pixels.
2 i, ii, iii each colour is 28 = 256
iv 256 × 256 × 256 = 16 777 216 possible colours
3 They both increase the size of the sound file.
1.16
1 1920 × 1536 = 2 949 120 pixels
colour depth = 16 16 × 2 949 120 = 47 185 920 bits
bits (÷ 8) 5 898 240 bytes
(÷ (1024 × 1024)) 5.625 MiB
2 1024 × 1536 = 1 572 864 pixels
colour depth = 24 24 × 1 572 864 = 37 748 736 bits
bits (÷ 8) 4 718 592 bytes
16 GiB = 17 179 869 bytes
number of photos = (17 179 869)/(4 718 592) = 3640 photos
3 a sample size = 44 100 × 8 × 2 (two tracks) = 705 600 bits
b file size = 44 100 × 8 × 30 × 2 (two tracks) = 21 168 000 bits
bytes (÷ 8) 2 646 000 bytes = 2.5 MiB
7 a Hours 0 0 0 0 0 0 1 0
Minutes 0 0 0 1 1 1 1 1
Seconds 0 0 1 1 1 0 1 0
b 00000101=5
0 0 0 1 1 0 1 0 = 26
0 0 1 1 0 1 1 1 = 55
Time shown as:
2 Data transmission
Answers to activities
2.1
1 Parts i and ii
• picture and sound out of synchronisation
• packets arriving at different times
• pauses in the video
• time delay in assembling packets
• degraded video and sound
• caused by competing traffic on the communications link
• possible 'drop out'
• packets take different routes, so some may get lost
2 • web page divided into data packets
• each packet has an IP address of the destination
• routers check header against IP address values to determine next router to send data packet
• hop value checked to see if it is zero
• destination computer reassembles data packets to build up the web page
3 a This takes all the 1-values in the payload and adds them together to generate a hex number.
• this hex value is stored in the trailer
• receiving computer carries out the same calculation on received payload
• if values match, data packets has been received error-free
• if values do not match, data packet needs to be re-sent
b 29 1-bits 1D in hex. If recalculated value doesn’t equal 1D hex then it needs to be re-sent.
4 a • packets keep 'bouncing around' from router to router and never reach the destination
• use hop numbers; if hop number = 0 then the packet is deleted and is therefore lost
Packets have a header which contains the IP address of the sender and
the receiver