0% found this document useful (0 votes)
136 views

Lab Activity - 2 - Number Systems

This document provides a lab activity on number systems that involves: - Converting binary, hexadecimal, and decimal numbers using position and division methods. - Practice questions to convert between the number systems with worked examples provided. - Self-reflection questions to log the time taken, difficulty, confidence gained, and feedback on resources used and lectures.

Uploaded by

Shadman Sifat
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views

Lab Activity - 2 - Number Systems

This document provides a lab activity on number systems that involves: - Converting binary, hexadecimal, and decimal numbers using position and division methods. - Practice questions to convert between the number systems with worked examples provided. - Self-reflection questions to log the time taken, difficulty, confidence gained, and feedback on resources used and lectures.

Uploaded by

Shadman Sifat
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

MOD002580 Computer Systems Compulsory Assessed Lab Activity - 2

Lab 2: Number Systems


You may complete this worksheet by hand (you do not need to type up your answers) as
long as your answers are legible. The relevant theory will be briefly discussed throughout
the worksheet, but you may find it helpful to bring along the lecture slides.

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.

Binary to decimal (base 2 to base 10)


One method to convert binary to decimal is the “position” method. Below is an example for
101001112.
 x 2 is the binary number, with each digit in its own column
 n is the “place number” of the column
 2n is the corresponding power of 2 for that column

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

Therefore 101001112 = 16710

There is also an algorithmic approach to the position method:

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

Then, let x be the digit in the number. From left to right:


1. Subtract 1 from n.
2. Multiply x with bn.
3. Add this number to s.

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

Decimal to binary (base 10 to base 2)


Continuously divide the decimal number by 2 until you get 0, noting down the remainder
each time (which will be 0 or 1). Reading the remainders from the lowest quotient to the
highest will give you the binary number.

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

Hexadecimal to decimal (base 16 to base 10)


We can use the same table we used for binary to decimal conversion, changing base 2 to
base 16. We also need to convert any alphabetical characters into decimal numbers:

A = 10, B = 11, C = 12, D = 13, E = 14, F = 15

Example: 3D9116 = 1576110

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

Decimal to hexadecimal (base 10 to base 16)


Use the same principle as for decimal to binary. If the remainder is between 10 and 15,
convert the remainder to the corresponding alphabetical character.

Example: 1576110 = 3D9116

Quotient Remainder Hexadecimal


16 15761
16 985 1 1
16 61 9 9
16 3 13 D
0 3 3

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?

3. Which parts did you find the least challenging?

4. Which parts did you find the most challenging?

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

You might also like