0% found this document useful (0 votes)
0 views8 pages

Lab Activity - 1 - Number Bases

The document outlines a lab activity focused on number systems, specifically converting between binary, decimal, and hexadecimal formats. It includes learning objectives, methods for conversion, example problems, and questions for practice. Additionally, there is a self-reflection section for students to assess their learning experience.

Uploaded by

53267
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views8 pages

Lab Activity - 1 - Number Bases

The document outlines a lab activity focused on number systems, specifically converting between binary, decimal, and hexadecimal formats. It includes learning objectives, methods for conversion, example problems, and questions for practice. Additionally, there is a self-reflection section for students to assess their learning experience.

Uploaded by

53267
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

MOD002580 Computer Systems Lab Activity - 1

Lab 1: Number Systems


Use Microsoft Word (or any software application to word process) to complete this
worksheet. 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”

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.

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
n
2 128 64 32 16 8 4 2 1
n
x2 × 2 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.

Question 1. Convert the following binary numbers into decimal. Show your working. [12

1
MOD002580 Computer Systems Lab Activity - 1

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 Lab Activity - 1

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) 14110 4) 9610

3
MOD002580 Computer Systems Lab Activity - 1

5) 17510 6) 16310

7) 24410 8) 11110

9) 10410 10)25210

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
n
16 4096 256 16 1
n
x 16 × 16 12288 3328 144 1
TOTAL 12288+3328+144 +1=15761

4
MOD002580 Computer Systems Lab Activity - 1

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

7) 41616 8) BA8C16

9) F60B16 10)21DA16

5
MOD002580 Computer Systems Lab Activity - 1

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

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

6
MOD002580 Computer Systems Lab Activity - 1

7) 4994910 8) 4788410

9) 1379610 10)3279610

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.]

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?

7
MOD002580 Computer Systems Lab Activity - 1

4. Which parts did you find the most challenging?

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.

You might also like