Find a course
Age level: Teens (12–18)BeginnerTechnology & Programming

Binary and Number Systems

Count, convert and calculate in binary, hexadecimal and octal like a computer

⏱ 1 h 50 min5 modules · 11 lessons68 practice questionsFinal exam: 20 questions
First name and initial are enough.
Included with this course

Your certificate for this course

Finish the 11 lessons (about 1 h 50 min) and pass the 20-question final exam. Your Certificate of Completion is ready the moment you pass.

  • Your name and this course titlePrinted in classic diploma typography
  • Grade: Pass, Merit or DistinctionOn the gold seal, with your final score
  • Unique ID and QR codeAnyone can verify it in seconds
  • Score report PDFModule-by-module results and exam score
  1. Lessons11 lessons
  2. Final exam20 questions · 70% to pass
  3. CertificatePDF + score report

What you will learn

  • Explain place value in any base and why computers use binary
  • Count in binary and recognize powers of two up to 210
  • Convert between binary, decimal and hexadecimal in both directions
  • Add binary numbers and identify overflow in a fixed number of bits
  • Represent negative numbers with two's complement and state the range of a signed byte
  • Describe how text, colors and images are encoded as bits
  • Convert between bits, bytes and larger units, and tell decimal from binary prefixes

About this course

Every photo on your phone, every song, every message and every game is stored as long rows of just two symbols: 0 and 1. That's the binary number system, and once you understand it, a lot of computing suddenly makes sense: why storage sizes come in numbers like 256 and 1,024, why web colors look like #FF8800, why an old game's score might suddenly reset to zero, and how the letter A becomes the number 65.

This free course teaches number systems from the ground up. You'll start with something you already know, place value in our everyday base-10 system, and use it to understand any base. Then you'll learn to count in binary, convert between binary and decimal in both directions, and recognize the powers of two that show up all over computing.

Next comes hexadecimal, the base-16 shorthand programmers use for colors, memory addresses and network hardware, plus a quick look at octal. You'll add binary numbers with carries, see exactly what overflow is, and learn how computers store negative numbers with two's complement. Finally, you'll find out how text, colors and images become bits, and how to make sense of bits, bytes, kilobytes and megabytes, including why your internet speed is measured in bits but file sizes in bytes.

The course is designed for teens, whether you're studying computer science in school, preparing for a CS exam or just curious about how computers think. No advanced math is needed: if you can add and multiply, you can do everything here. Each lesson includes worked examples, interactive converters, coding challenges and quick checks, and passing the final exam earns you a free certificate of completion.

Syllabus

  1. Counting in Different Bases

    Use what you know about place value in decimal to understand any base, then learn to count in binary and recognize the powers of two.

    1. Place Value and Number Bases11 min
    2. Counting in Binary and Powers of Two12 min
  2. Converting Binary and Decimal

    Convert binary numbers to decimal using place values, and decimal numbers to binary with two reliable methods.

    1. Binary to Decimal11 min
    2. Decimal to Binary12 min
  3. Hexadecimal and Octal

    Learn base 16, the programmer's shorthand for binary, convert it to and from decimal and binary, and meet octal.

    1. Hexadecimal Basics12 min
    2. The Hex-Binary Shortcut and Octal12 min
  4. Binary Arithmetic

    Add binary numbers with carries, see what overflow does in a fixed number of bits, and learn how computers store negative numbers.

    1. Binary Addition and Overflow12 min
    2. Negative Numbers and Two's Complement13 min
  5. Text, Images and Data Sizes

    Discover how letters, colors and pictures become bits, and make sense of bytes, kilobytes, megabytes and internet speeds.

    1. Text as Numbers with ASCII and Unicode12 min
    2. Colors and Images in Binary12 min
    3. Bits, Bytes and Storage Sizes12 min
  6. Final exam and certificate

    20 questions drawn from a pool of 34. Score 70% or more to pass; retakes get a fresh set of questions.

Try a sample question

Computers use binary because it is the only base that can represent large numbers.

True or false?

Show the answer

Answer: False

Any base can represent any whole number; decimal handles huge numbers fine. Computers use binary because their hardware reliably distinguishes two states, on and off, which map naturally onto the digits 1 and 0.

Base
The number of different digits a number system uses; decimal is base 10 and binary is base 2.
Place value
The value a digit has because of its position, such as tens or hundreds in decimal.
Decimal
The base-10 number system, using the digits 0 to 9.
Binary
The base-2 number system, using only the digits 0 and 1.
Hexadecimal
The base-16 number system, using the digits 0 to 9 and the letters A to F.
Octal
The base-8 number system, using the digits 0 to 7.

Frequently asked questions

Why do computers use binary instead of decimal?

Computer hardware is built from billions of tiny switches called transistors, and a switch is most reliable when it only needs to tell two states apart, on or off. Two states map neatly onto the digits 1 and 0, so binary is the natural language of electronic circuits.

What is the fastest way to convert decimal to binary?

For small numbers, subtract the largest power of two that fits, write a 1 in that place, and repeat with what's left. For larger numbers, repeatedly divide by 2 and read the remainders from bottom to top. Both methods are taught step by step in this course.

Why do programmers use hexadecimal?

Each hexadecimal digit stands for exactly four binary digits, so long binary numbers become short and readable. A byte like 11111111 is just FF in hex. That's why colors, memory addresses and hardware IDs are usually written in hex.

Is a kilobyte 1,000 or 1,024 bytes?

Officially, a kilobyte (kB) is 1,000 bytes and a kibibyte (KiB) is 1,024 bytes. In practice, some operating systems still use "KB" to mean 1,024 bytes, which is why a drive sold as 1 TB shows up as about 931 GB on some computers.

Do I need to know binary to learn programming?

You can start programming without it, but binary explains many things you'll run into, like why 0.1 + 0.2 isn't exactly 0.3, why integers have maximum values and how colors and file sizes work. It's a core topic in computer science courses and exams.

What is two's complement?

It's the standard way computers store negative whole numbers. The leftmost bit carries a negative place value, so in 8 bits the range is -128 to 127, and the same addition circuits work for both positive and negative numbers.

Sources and further reading

Related courses

TeensBeginner

Computer Science Principles

Data, algorithms, the internet and the impact of computing, the big ideas of CS

Technology & Programming
1 h 55 min11 lessonsCertificate
University studentsBeginner

Introduction to Computer Science

Binary, hardware, algorithms, code and the internet: the ideas behind every computer

Technology & Programming
2 h 35 min12 lessonsCertificate
University studentsBeginner

How Computers Work

From bits and logic gates to processors, memory and the operating system

Technology & Programming
2 h 25 min11 lessonsCertificate
University studentsIntermediate

Operating Systems Concepts

Processes, threads, scheduling, memory, file systems and protection explained

Technology & Programming
2 h 50 min11 lessonsCertificate
University studentsIntermediate

Object-Oriented Programming

Classes, encapsulation, inheritance, polymorphism and SOLID design

Technology & Programming
2 h 40 min12 lessonsCertificate
University studentsIntermediate

Data Structures and Algorithms

Big O, arrays, hash tables, trees, graphs, sorting and dynamic programming with hands-on code

Technology & Programming
2 h 40 min13 lessonsCertificate