Professional Documents
Culture Documents
Unit 1 Practice Questions QP and MS
Unit 1 Practice Questions QP and MS
Task 1
1. (a) Apply a right shift of one binary place on the following byte.
1 0 0 1 1 1 1 0
(b) Convert the original and shifted binary numbers into denary.
2. (a) Apply a left shift of one binary place on the following byte.
0 1 0 1 1 0 1 0
(b) Convert the original and shifted binary numbers into denary.
3. (a) The binary number: 1101 1001 is stored in an 8-bit register. A right shift is carried out and the
result is stored in the register. After processing, state the binary value stored in the register.
(b) State the denary value stored in the register before and after the right shift.
Before:
After:
1
(c) Explain the problem that has occurred with the least significant bit stored in the register.
Task 2
1. Complete the table below by converting the binary numbers shown to their two’s complement. Also add
in the denary equivalent of all binary numbers shown.
The first row has been completed for you.
0110 0110
0011 0111
0101 0100
0000 0000
1101 0101
1000 0110
2
Answers
Task 1
3. (a) Apply a right shift of one binary place on the following byte.
1 0 0 1 1 1 1 0
0 1 0 0 1 1 1 1
(b) Convert the original and shifted binary numbers into denary.
158 and 79
4. (a) Apply a left shift of one binary place on the following byte.
0 1 0 1 1 0 1 0
1 0 1 1 0 1 0 0
(b) Convert the original and shifted binary numbers into denary.
90 and 180
3. (a) The binary number: 1101 1001 is stored in an 8-bit register. A right shift is carried out and the
result is stored in the register. After processing, state the binary value stored in the register.
0110 1100
(b) State the denary value stored in the register before and after the right shift.
Before: 217
After: 108
(c) Explain the problem that has occurred with the least significant bit stored in the register.
The least significant bit was storing 1. When the right shift occurs this information is lost, resulting
in the number being rounded down / the 0.5 is lost.
3
Answer
Task 2
1. Complete the table below by converting the binary numbers shown to their two’s complement. Also add
in the denary equivalent of all binary numbers shown.
The first row has been completed for you.
4
Binary Addition
1. Start with this simple addition. (You can use rules (a) and (b) to help you if necessary.) Calculate
the denary equivalent to check that it is correct.
8 4 2 1 Denary equivalent
0 0 1 1 = 3
+ 0 1 0 0 = +
= = =
2. Use the same techniques as you did in the last question to find the binary result.
0 0 0 1
+ 1 1 0 0
=
3. Now use rule (d) to help with this problem. Use the carry row at the top for the carried 1.
0 0 1 1
+ 1 0 1 0
=
4. This one will carry into a new column. Remember that like in denary addition, the last carry just makes
the number bigger and is added on to the left of the number.
1 0 1 0
+ 1 0 1 1
=
5
5. Use rule (e) in this question. Use the carry row again and remember: 1+1+1 = 1 carry 1.
0 1 1 0
+ 1 1 1 0
=
6. Now try a full 8-bit binary number. Apply the same rules as before.
1 0 0 0 1 0 1 1
+ 0 1 0 0 1 0 1 0
=
7. Here is another 8-bit number that requires you use all of the rules.
1 0 0 1 1 1 1 0
+ 0 1 0 1 1 0 1 0
=
8. Now try without the help of the grid or rules (a) to (e) to refer to.
1 0 1 0 0 1 0 1
+ 0 0 1 1 1 1 0 0
=
Answer
6
1. Start with this simple addition. (You can use rules (a) and (b) to help you if necessary.) Calculate
the denary equivalent to check that it is correct.
8 4 2 1 Denary equivalent
0 0 1 1 = 3
+ 0 1 0 0 = + 4
= 0 1 1 1 = = 7
2. Use the same techniques as you did in the last question to find the binary result.
0 0 0 1
+ 1 1 0 0
= 1 1 0 1
3. Now use rule (d) to help with this problem. Use the carry row at the top for the carried 1.
1
0 0 1 1
+ 1 0 1 0
= 1 1 0 1
4. This one will carry into a new column. Remember that like in denary addition, the last carry just makes
the number bigger and is added on to the left of the number.
1 1
1 0 1 0
+ 1 0 1 1
= 1 0 1 0 1
5. Use rule (e) in this question. Use the carry row again and remember: 1+1+1 = 1 carry 1.
1 1 1
0 1 1 0
+ 1 1 1 0
= 1 0 1 0 0
6. Now try a full 8-bit binary number. Apply the same rules as before.
1 1
1 0 0 0 1 0 1 1
+ 0 1 0 0 1 0 1 0
= 1 1 0 1 0 1 0 1
7. Here is another 8-bit number that requires you use all of the rules.
1 1 1 1
1 0 0 1 1 1 1 0
+ 0 1 0 1 1 0 1 0
= 1 1 1 1 1 0 0 0
8. Now try without the help of the grid or rules (a) to (e) to refer to.
1 1 1 1
1 0 1 0 0 1 0 1
+ 0 0 1 1 1 1 0 0
= 1 1 1 0 0 0 0 1
7
An 8-bit binary number holds 256 different numbers – 0-255. When the result of the addition is greater than
255, an overflow error occurs.
(b) The code word is represented on the disk in a binary format, saved as:
Character Binary
A 01000001
B 01000010
C 01000011
D 01000100
E 01000101
Using the
section of the ASCII table above, what is the code word? [3]
8
2. Integers which are to be used in calculations are represented as binary numbers.
(a) What is the 8-bit binary representation of the number 76? [1]
(c) Give two advantages of representing integers in binary rather than ASCII. [2]
3. (a) Name one limitation of the 8-bit extended ASCII character set. [1]
Answers
1. A simple three-letter code word is saved to a hard disk.
9
(a) What is the size in bytes of the code word? 3 [1]
(b) The code word is represented on the disk in a binary format, saved as:
Character Binary
A 01000001
B 01000010
C 01000011
D 01000100
E 01000101
Using the section of the ASCII table above, what is the code word? CAB [3]
(c) What is the hexadecimal representation of the code word? 434142 [2]
(c) Give two advantages of representing integers in binary rather than ASCII. [2]
Binary numbers take up much less space / e.g. the string 76 needs two bytes,
but the integer needs just 1 byte.
Calculations are much simpler.
3. (a) Name one limitation of the 8-bit extended ASCII character set. [1]
Only 256 characters can be represented, so there is no way of representing characters from large
character sets such as Japanese/Chinese.
(b) Explain how these limitations can be overcome. [2]
By using more bits for each character / Unicode which uses 16 bits (1).
so that there are more available combinations to store the new characters (1).
10
1. The length of a recording will heavily influence the size of the sound file.
State two factors other than recording length that determine the file size of a recording. [2]
ANSWER
1. The length of a recording will heavily influence the size of the sound file.
State two factors other than recording length that determine the file size of a recording. [2]
1 mark for each stage in the calculation. Award full marks if the correct answer and unit are given but
intermediate workings are not shown. 1 mark is given for the unit (MB/megabytes).
IMAGE File Size
11
1. State two factors that affect the file size of a bitmap image. [2]
ANSWER
1. State two factors that affect the file size of a bitmap image. [2]
Colour depth / number of bits per pixel / number of colours in the image.
12
Dimensions of the image in pixels / resolution. ‘Size of the image’ is not enough.
Answers include:
size = resolution x colour depth
size = 10 000 000 pixels x 24 bits per pixel (1)
size = 240 000 000 bits
size = 240 000 000 / 8 = 30 000 000 bytes (1)
size = 30 000 000 / (10242) = 28.6 MiB (1)
1 mark for each stage. Award 3 marks if there is a correct answer with units. Units are either MiB or
mebibytes.
COMPRESSION
1. (a) Give two reasons why you might compress photographic files
before emailing them. [2]
13
Reason 1.
Reason 2:
(ii) A video recording which you have made of the school play. [2]
2. A music production company needs to save music at the highest quality possible. They would like to
make use of compression if possible.
Explain how compression can help the music production company. [2]
14
3. An algorithm called Run Length Encoding is used to compress an image. It converts the file by
recording the colour code, represented here by a letter, followed by the number of pixels of the same
colour, e.g. R4.
(a) Give the result of applying the algorithm to the following data for an image: [2]
G G G G G R R R Y Y Y Y Y Y R R R G G G G
4. Describe the effect of reducing the resolution and colour depth of an image. [3]
15
Answers
1. (a) Give two reasons why you might compress photographic files
before emailing them. [2]
Reason 1. Files take less time for the receiver to download.
Reason 2: The file size may exceed the limit of what can be attached to an email.
Or another reason such as reducing the storage size on a friend’s computer / email storage quota.
2. A music production company needs to save music at the highest quality possible. They would like to
make use of compression if possible.
Explain how compression can help the music production company. [2]
The file size of the compressed file will be smaller (1) so take up less storage space (1) or be faster to
upload / transmit / email (1).
3. An algorithm called Run Length Encoding is used to compress an image. It converts the file by
recording the colour code, represented here by a letter, followed by the number of pixels of the same
colour, e.g. R4.
(a) Give the result of applying the algorithm to the following data for an image: [2]
G G G G G R R R Y Y Y Y Y Y R R R G G G G
G5R3Y6R3G4
(b) Is this lossy or lossless compression?
Explain your answer: [2]
Lossless – no data is lost by the compression/decompression process and the image will be
restored exactly as the original data.
4. Describe the effect of reducing the resolution and colour depth of an image. [3]
Reducing the colour depth or resolution will result in a reduced file size. (1)
Data will be permanently lost by doing this. (1)
A reduction in colour depth will give a reduced number of colours that can be used resulting in a lower
quality image / gradations will have sudden changes in colour. (1)
A reduction in the resolution / number of pixels in the image will result in the image being lower quality
(assuming both images are displayed at the same physical size). (1)
Accept other appropriate examples of how resolution and colour depth changes affect image size.
16
Past Paper Questions
Q1.
Jamelia wants to store an image file. The image has an 8-bit resolution and is 150 pixels by
100 pixels in size.
Calculate the file size of the image. Give your answer in kilobytes (kB). Show all of your
working.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
File size ........................................................................................................... kB
Q2.Six binary or hexadecimal numbers and six denary conversions are given.
Draw a line to connect each binary or hexadecimal number to the correct denary conversion.
Q3.
18
19
Q4.
20
Q5.
21
22
Q6.
23
24
Q7.
Q8.
25
Q9.
Q10.
26
Q11.
27
Q12.
28
29
30
31
Q13.
32
33
34