Interactive Lesson

Binary Place Values & Decimal ↔ Binary Conversion

Computers only understand two digits: 0 and 1. In this lesson you will learn how place values work in binary, and how to convert numbers between decimal and binary — step by step, in simple English.

01 — Try It Yourself

Bit Explorer

Click the boxes below to turn bits ON (1) or OFF (0). Watch how the decimal value changes. This is exactly how an 8-bit binary number works.

DECIMAL VALUE0

02 — The Basic Idea

What Is Binary?

Binary is a number system that uses only two digits: 0 and 1. This is called "base-2". Our everyday number system (0–9) is "base-10". Computers use binary because electronic switches only have two states: off (0) and on (1).

In decimal, each place value is 10 times bigger than the one to its right (1, 10, 100, 1000...). In binary, each place value is only 2 times bigger than the one to its right. Here are the place values for an 8-bit binary number:

2⁷
128
2⁶
64
2⁵
32
2⁴
16
8
4
2
2⁰
1

Notice the pattern: 1, 2, 4, 8, 16, 32, 64, 128 — each number is double the one before it. That pattern is the key to everything in this lesson.

03 — Method 1

Decimal → Binary (Divide by 2)

To convert a decimal number into binary, keep dividing it by 2 and write down the remainder each time. Stop when the number reaches 0. Then read the remainders from bottom to top.

Worked Example: Convert 13 to binary

Number÷ 2QuotientRemainder
1313 ÷ 261
66 ÷ 230
33 ÷ 211
11 ÷ 201
Read remainders bottom → top: 1101  so  13 = 1101 in binary

Now try it yourself:

Please enter a whole number between 0 and 255.

04 — Method 2

Binary → Decimal (Add the Place Values)

To convert binary into decimal, multiply each bit by its place value, then add up all the results.

Worked Example: Convert 10110 to decimal

Bit10110
Place Value168421
Bit × Place160420
16 + 0 + 4 + 2 + 0 = 22  so  10110 = 22 in decimal

Now try it yourself:

Please enter only 0s and 1s (1 to 8 digits).

05 — Simple Quiz

Check Your Understanding

Answer all 10 questions, then click Check Answers to see your score and explanations.

0/10