Lab Activity - 2 - Number Systems
Lab Activity - 2 - Number Systems
Learning Objectives: By the end of this lab session you should be able to
• Convert binary and hexadecimal numbers to decimal using the “position method”
• Convert decimal numbers to binary and hexadecimal using the “division method”
Required Reading: Chapters 3 and 5 in The Architecture of Computer Hardware and
System Software: An Information Technology Approach, Fifth Edition, Irv Englander.
This worksheet should take around 2-3 hours to complete. There are many questions (and
therefore plenty of practice!). The aim is that by completing this worksheet, you should be
proficient at quickly and accurately converting between different base number systems.
When completing this worksheet, you must show your working. Failure to do so will
result in a very low mark.
x2 1 0 1 0 0 1 1 1
n 7 6 5 4 3 2 1 0
2n 128 64 32 16 8 4 2 1
x 2 × 2n 128 0 32 0 0 4 2 1
TOTAL 128+0+ 32+ 0+0+ 4+2+1=167
Declare 3 variables:
n: a number which is initially the total number of digits
b: the base of the number
s: the running total sum, with an initial value of 0
1
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
Question 1. Convert the following binary numbers into decimal. Show your working. [12
marks]
1) 101100112 2) 101011002
3) 11011012 4) 11110102
5) 10100102 6) 101111012
7) 111000012 8) 11000102
9) 10000112 10)110101012
2
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
11)111011012 12)10011012
Quotient Remainder
2 167
2 83 1
2 41 1
2 20 1
2 10 0
2 5 0
2 2 1
2 1 0
0 1
We have reached 0, and so we stop here. Reading from bottom to top, we have:
16710 = 101001112
Question 2. Convert the following decimal numbers into binary. Show your working. [12
marks]
1) 6810 2) 9710
3
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
3) 14110 4) 9610
5) 17510 6) 16310
7) 24410 8) 11110
9) 10410 10)25210
11)10810 12)14810
4
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
x 16 3 D 9 1
n 3 2 1 0
16n 4096 256 16 1
x 16 × 16n 12288 3328 144 1
TOTAL 12288+3328+144 +1=15761
Question 3. Convert the following hexadecimal numbers to decimal. Show your working.
[12 marks]
1) 87FA16 2) 5E0016
3) 4E9416 4) 79BA16
5) 1A7116 6) 764A16
5
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
7) 41616 8) BA8C16
9) F60B16 10)21DA16
11)935D16 12)ED1B16
6
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
Question 4. Convert the following decimal numbers to hexadecimal. Show your working.
[12 marks]
1) 2980610 2) 1181110
3) 5047410 4) 2978610
5) 4395510 6) 6434810
7) 4994910 8) 4788410
9) 1379610 10)3279610
7
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
11)3921010 12)4621410
Value-added work.
For each question part (48 in total), an additional 1 mark is available if working is shown
(even if the answer is incorrect). There are therefore an additional [48 marks] available for
showing working.
Need more practice? You can find more questions here (useful for revision):
https://www.math-aids.com/Number_Systems/
Self-reflection and feedback. After completing the lab, please answer the following
questions in your logbook. [An automatic 4 marks is awarded for full completion of this
section. Your feedback is greatly appreciated.]
1. Roughly how long did it take you to complete this lab and write up the logbook?
2. On a scale of 1 (very easy) to 5 (very hard), how difficult did you find this lab?
8
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
5. On a scale of 1 (not very confident at all) to 5 (very confident), how confident are
you now with converting between different number systems?
6. Please list any external resources (textbooks, websites, other people, etc.) used
when completing this lab or the logbook.
7. Please list any other comments on this lab or on the lectures you may have.
9
MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2
10