Uploaded by vehitiv198

Assign1 Theory

advertisement
Computer Science
Assignment
1. A variety of goods stored in a warehouse. All goods are bar coded. The number of each
item in the warehouse is stored as a binary number.
(a) Change 125 into a binary number stored in an 8 bit byte. Show your working.
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
Your Answer: (
[2]
)2
(b) Convert your answer in question 1. (a), into hexadecimal number. Show your
working.
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
Your Answer: (
[2]
)16
(c) Convert your answer in question 1. (b) into denary (decimal) number. Show your
working.
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
Your Answer: (
)10
[2]
Page 1 of 12
2.
2. A vending machine has the choices shown below
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?
[1]
(ii) How is it represented in the 6-bit register?
[1]
(b) If the 6-bit register shows
What drink has the customer chosen?
[1]
……………………………………………………………………………
(c) A customer using the vending machine gets an error message after keying in their
selection.
What could have caused this error message?
……………………………………………………………………………
[1]
……………………………………………………………………………
Page 2 of 12
(d) It was decided to split the register so that each digit was represented by its own 3-bit
register:
(i) What drink has been chosen if the 3-bit registers contain:
……………………………………………………………………………
[1]
……………………………………………………………………………
(ii) How would the lemon option be shown on both types of register?
[2]
(iii) What is the advantage of using two 3-bit registers rather than one 6-bit
register?
……………………………………………………………………………
[1]
……………………………………………………………………………
Page 3 of 12
3.
Page 4 of 12
4.
Page 5 of 12
5.
Page 6 of 12
6.
Page 7 of 12
7.
Page 8 of 12
Page 9 of 12
8.
Page 10 of 12
Page 11 of 12
Page 12 of 12
Download