Computer Science
Beginner
80 mins
Teacher/Student led
What you need:
Chromebook/Laptop/PC

Number Systems: Decimal, Binary & Hex

In this lesson, you'll explore the basics of different number systems used in computing. Learn how decimal, binary, and hexadecimal work, practise converting between them, and see real-world examples to understand their importance in technology.
Learning Goals Learning Outcomes Teacher Notes

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction to Number Systems

    Binary, Decimal, and Hexadecimal are fundamental number systems used in computing. Decimal is the system we use every day with digits 0-9, Binary is the language of computers using only 0s and 1s, and Hexadecimal is a shorthand way to represent binary numbers.

    • Decimal is the system we use every day with digits 0-9.
    • Binary is the language of computers, using only 0s and 1s.
    • Hexadecimal is a shorthand way to represent binary numbers.
    In this lesson, you'll learn the basics, do conversion exercises, and see real-world examples. If this topic feels difficult at first, don't get disheartened—it's common to find it challenging, but by taking it one step at a time and practising, you'll get the hang of it. Remember, understanding number systems is key to grasping how computers work.

    2 - Understanding the Decimal System

    The decimal system is the number system we use every day, such as when counting money, ages, or scores in games. It's based on base-10, which means it uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. This system is familiar because it's how we naturally count, often linked to having ten fingers.

    Each digit in a decimal number has a position that determines its value, based on powers of 10. The rightmost digit is the ones place (10 to the power of 0, which equals 1), the next digit to the left is the tens place (10 to the power of 1), then hundreds (10 to the power of 2), and so on. This might sound tricky at first, but it's straightforward once you see it in action.

    Let's break down a simple example with the number 345:

    Digit Place Value (Power of 10) Actual Value
    3 Hundreds (102) 3 × 100 = 300
    4 Tens (101) 4 × 10 = 40
    5 Ones (100) 5 × 1 = 5

    Now, add these values together: 300 + 40 + 5 = 345. See how the position of each digit changes what it represents? For instance, the '3' is worth 300 because it's in the hundreds place.

    Decimal numbers are intuitive for humans because they're based on tens, making them easy to read and write. However, computers use binary (base-2) instead, as it's more efficient for their electronic components.

    3 - Practical task: Decimal System

    Choose three different decimal numbers between 100 and 1000. For each number, write it down and break it down into its place values (hundreds, tens, and ones). Then, write the expanded form by multiplying each digit by its place value and adding them together.

    For example, if you choose 567, here is the breakdown:

    Digit Place Value Actual Value
    5 Hundreds (102) 5 × 100 = 500
    6 Tens (101) 6 × 10 = 60
    7 Ones (100) 7 × 1 = 7

    The sum of these values is 500 + 60 + 7 = 567, which is the expanded form.

    Follow these steps for each of your three numbers:

    • Identify the digit in the hundreds place and calculate its value (digit × 100).
    • Identify the digit in the tens place and calculate its value (digit × 10).
    • Identify the digit in the ones place and calculate its value (digit × 1).
    • Sum these values to write the expanded form.

    4 - Understanding the Binary System

    Binary is a number system that forms the foundation of how computers store and process information. It's a base-2 system, which means it only uses two digits: 0 and 1. Computers use binary because it's simple to represent with electronic components that can be either on (1) or off (0).

    Each digit in a binary number, called a bit, represents a power of 2, starting from the rightmost digit. The rightmost bit is 2 to the power of 0 (which is 1), the next one to the left is 2 to the power of 1 (2), then 2 to the power of 2 (4), and so on. This might seem unfamiliar at first, but it's straightforward when you break it down with an example.

    Let's look at the binary number 101 and see what it means in decimal.

    DigitPlace Value (Power of 2)Actual Value
    1Four (22)1 × 4 = 4
    0Two (21)0 × 2 = 0
    1One (20)1 × 1 = 1

    Now, add these values together: 4 + 0 + 1 = 5 in decimal. So, binary 101 equals decimal 5. This shows how the position of each bit determines its value, just like in decimal but with powers of 2 instead of 10.

    Binary is essential in computing because it allows data to be represented in a way that's efficient for machines. For example, a single byte (8 bits) can represent numbers from 0 to 255 in decimal. As you progress in this lesson, you'll learn how to convert between binary and other systems, which will help you understand how computers handle data.

    Now, let's learn how to convert a decimal number to binary. For example, convert decimal 5 to binary.

    To do this, divide the decimal number by 2 repeatedly and record the remainders. The binary number is read from the last remainder to the first.

    DivisionQuotientRemainder (Binary Digit)
    5 ÷ 221 (least significant bit)
    2 ÷ 210
    1 ÷ 201 (most significant bit)

    Reading the remainders from bottom to top gives binary 101. To verify, we can convert binary 101 back to decimal, which is 4 + 0 + 1 = 5, matching our original number.

    5 - Practical Task: Binary System

    Choose three different binary numbers between 000 and 111 (for example, 011, 100, and 110). For each number, write it down, break it down into its place values (powers of 2), and calculate the decimal equivalent by summing the values.

    For example, take binary 101:

    DigitPlace Value (Power of 2)Actual Value
    1Four (22)1 × 4 = 4
    0Two (21)0 × 2 = 0
    1One (20)1 × 1 = 1

    Sum: 4 + 0 + 1 = 5 in decimal.

    Follow these steps for each of your three binary numbers:

    • Identify each digit and its place value (starting from the right: 20, 21, 22).
    • Calculate the actual value for each digit by multiplying the digit by its place value.
    • Sum the values to get the decimal number.

    Here are the solutions for the example binary numbers 011, 100, and 110:

    Binary 011

    DigitPlace Value (Power of 2)Actual Value
    0Four (22)0 × 4 = 0
    1Two (21)1 × 2 = 2
    1One (20)1 × 1 = 1

    Sum: 0 + 2 + 1 = 3 in decimal.

    Binary 100

    DigitPlace Value (Power of 2)Actual Value
    1Four (22)1 × 4 = 4
    0Two (21)0 × 2 = 0
    0One (20)0 × 1 = 0

    Sum: 4 + 0 + 0 = 4 in decimal.

    Binary 110

    DigitPlace Value (Power of 2)Actual Value
    1Four (22)1 × 4 = 4
    1Two (21)1 × 2 = 2
    0One (20)0 × 1 = 0

    Sum: 4 + 2 + 0 = 6 in decimal.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more