Anda di halaman 1dari 4

ASPAEN COLEGIO JUANAMBU

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)

State its hexadecimal representation.(show your working)


______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

(v)

Why is hexadecimal often used as an alternative to binary in computers?


______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

(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?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

2. A vending machine has the choices shown below.


10

Tea

11

Tea with milk

12

Tea with sugar

13

20

Coffee

21

Coffee with milk

22

Coffee with sugar

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

Tea with milk


and sugar
Coffee with milk
and sugar
Chocolate with
extra milk and
sugar

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?

ii. How is it represented in the 6-bit register?

(b) If the 6-bit register shows

what drink has the customer chosen? _____________________________________________

(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

would now be represented as:

What drink has been chosen if the 3-bit registers contain:

________________________________________________________________________
________________________________________________________________________
(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

One of the bytes contains an error. State which byte.


_______________________________________________________________________
Explain your choice of answer in (i).
_______________________________________________________________________
_______________________________________________________________________
Explain why a byte may still be in error even if it passes the parity test.
_______________________________________________________________________
_______________________________________________________________________

b. A second method of checking for errors is to use check sums.


Explain how check sums are used to check data for transmission errors: ___________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________

Anda mungkin juga menyukai