ELEVENTH GRADE
COMPUTER SCIENCE WORKSHOP WEEK 6
STUDENT NAME: __________________________________________________
1. The binary pattern 1001 0111 0100 can represent different numbers.
(i)
If a nibble (a half byte) is used to represent a number, state its value in denary. (show your
working)
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
(ii)
If a byte is used to represent each number (complete with zeros to the left), state its value in
denary. (show your working)
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
(iii)
State its value in denary as one whole number. (show your working)
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
(iv)
(v)
(vi)
In the RGB Color scheme a six digits hexadecimal code is used to represent each color, with
the first two digits representing the red, the next two representing the green and the last
two representing the Blue. To understand this, the code #FFFFFF is used to represent the
white as the combination of the three colors and the code #FF0000 to represent the color
blue. Which will be the code for the color green and explain your answer?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Tea
11
12
13
20
Coffee
21
22
23
30
Chocolate
31
Chocolate with
extra milk
32
Chocolate with
extra sugar
33
40
50
60
Cold water
Coke
Chicken soup
41
51
61
Hot water
Orange Soda
Tomato soup
42
52
Fizzy water
Lemon Soda
A customer uses a keypad to make their choice. Each number entered is represented in a 6-bit binary
register.
For example, key press 33 (hot chocolate with extra milk and extra sugar) is represented by:
(a) i. If a customer chooses coffee with milk and sugar what is the key press?
(c) A customer using the vending machine gets an error message after keying in their selection.
What could have caused this error message?
_____________________________________________________________________________
_____________________________________________________________________________
(d) It was decided to split the register so that each digit was represented by its own 3-bit register:
For example,
(i)
4 2
________________________________________________________________________
________________________________________________________________________
(ii)
How would the lemon soda option be shown on both types of register?
(iii)
What is the advantage of using two 3-bit registers rather than one 6-bit register?
________________________________________________________________________
________________________________________________________________________
3. The data which is transmitted between survey sites and head office is liable to errors. Data which is
received is checked for errors.
a. One method of checking for errors is to use parity checks.
The following four bytes have been received:
01101001
i.
ii.
iii.
10111100
10101010
00100100