Professional Documents
Culture Documents
1st Chapter Test Solution
1st Chapter Test Solution
(iii) Using two’s complement, show how the following denary numbers could be stored in an 8-bit
register: [4]
114
128 64 32 16 8 4 2 1
0 1 1 1 0 0 1 0
0 1 1 1 0 0 1 0
- 93
-128 64 32 16 8 4 2 1
1 1 0 1 1 1 0 1
1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 0
+ 1
1 0 1 0 0 0 1 1
124
128 64 32 16 8 4 2 1
0 1 1 1 1 1 0 0
0 1 1 1 1 1 0 0
–77
-128 64 32 16 8 4 2 1
1 1 0 0 1 1 0 1
1 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0
+ 1
1 0 1 1 0 0 1 1
1|P a g e
(iv) Convert the two numbers into hexadecimal.
124
128 64 32 16 8 4 2 1
0 1 1 1 1 1 0 0
7 12
7 C
–77
128 64 32 16 8 4 2 1
0 1 0 0 1 1 0 1
4 13
4 D
-4D [2]
(b) Binary Coded Decimal (BCD) is another way of representing numbers.
(i) Write the number 359 in BCD form.
3 5 9
0011 0101 1001 [1]
(ii) Describe a use of BCD number representation.
[2]
2 (a)
(i) Convert the following denary integer into 8-bit binary.
55
128 64 32 16 8 4 2 1
0 0 1 1 0 1 1 1 [1]
(ii) Convert the following Binary Coded Decimal (BCD) number into denary.
10000011
1 0 0 0 0 0 1 1
8 3 [1]
(iii) Convert the following denary integer into 8-bit two’s complement.
-102 [2]
-128 64 32 16 8 4 2 1
1 1 1 0 0 1 1 0
1 0 0 1 1 0 1 0
1 0 0 1 1 0 0 1
+ 1
1 0 0 1 1 0 1 0
2|P a g e
(iv) Convert the following hexadecimal number into denary.
4E
................................................................................................................................................................. [1]
3|P a g e
3
Anya scans an image into her computer for a school project.
(a) The scanned image is a bitmapped image.
(i) Complete the following table to describe the two terms about graphics. [2]
Term Description
Pixel A single square of one colour
The smallest addressable element in an image
File header
Data about the bitmap image (e.g. number of colours)
(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: • 1024 × 512 = 524 288 pixels/bytes • 524288 / 1024 / 1024 Answer: 0.50 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 Run-length encoding
Description
• Replace sequences of the same colour pixel • … with colour code and number of identical
pixels [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.
252 [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.
• Converting 15 to binary 0000 1111
• Method for addition
• Final answer 0011 0010
0010 0011
+ 0000 1111
0011 0010
1 111
[3]
4|P a g e
(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.
Converting −10 to two's complement binary 1111 0110
• Adding values
• Final answer 0001 1001
10 = 0000 1010
–10 = 1111 0110
0010 0011
+ 1111 0110
0001 1001
11 11
[3]
4
A computer uses the ASCII character set.
(a) State the number of characters that can be represented by the ASCII character set and the extended
ASCII character set.
ASCII 128 // 27
Extended ASCII 256 // 28 [2]
(b) Explain how a word such as ‘HOUSE’ is represented by the ASCII character set.
(c) Unicode is a different character set. The Unicode value for the character ‘1’ is denary value 49.
(i) Write the hexadecimal value for the Unicode character ‘1’.
31 [1]
(ii) Write the denary value for the Unicode character ‘5’.
53 [1]
5|P a g e
5
Computers store data in binary form.
(a) State the difference between a tebibyte and a terabyte.
one tebibyte is 1024 gibibytes and one terabyte is 1000 gigabytes [1]
(b) Convert the signed denary value –100 into an 8-bit two’s complement binary integer.
Working
-128 64 32 16 8 4 2 1
1 1 1 0 0 1 0 0 one’s complement
0 0 0 1 1 0 1 1
+ 1
1 0 0 1 1 1 0 0
Answer 1001 1100 [1]
(c) Convert the denary number 251 into hexadecimal.
Show your working.
Working
converting to binary (11111011)
1111 = 15 = F
1011 = 11 = B
Answer FB [2]
(d) Add the following unsigned binary integers. [1]
01010000
+00111110
10001110
6
Text and numbers are examples of data stored in a computer.
(a) A character set is used to represent characters in a computer.
(i) Describe what is meant by a character set.
(ii) Identify two character sets and state one difference between them.
Character set ASCII
Extended ASCII
UNICODE
6|P a g e
Difference ASCII has 7 bits whereas UNICODE has 16 bits
Extended ASCII has 8 bits whereas UNICODE has 16 bits
ASCII has 7 bits whereas extended ASCII has 8 bits
Unicode can represent more characters than ASCII/Extended// by example
Extended ASCII can represent more characters than ASCII [3]
(iii) Describe how lossless compression can be used to reduce the file size of a text file.
Can use run-length encoding
Identifies groups of repeated characters ...
... replaces them with a one copy of the character and the number of times it occurs [2]
(iv) Explain why lossy compression should not be used on a text file.
None of the original data can be lost / deleted
The (text) file would be corrupted // the (text) file cannot be opened [2]
Statement Answer
7|P a g e