Binary numbers: convert binary to decimal and back
Learn how computers store data as bits and bytes, convert between binary and decimal and add binary numbers, with worked examples.
KS3GCSEMiddle SchoolHigh SchoolCurriculum fit: KS3 and GCSE Computing / Computer Science (data representation: binary). US: no US standards source is linked here: check your school's computer science curriculum.
On this page
What is it?
Computers store all data as binary, using only the digits 0 and 1. This is because electronic circuits are easy to build with two states, on and off. A single binary digit is a bit, and eight bits make a byte.
Binary is a base-2 number system. Each place value is double the one to its right, just as in decimal each place is ten times the one to its right.
Key formulas and ideas
- Place values for 8 bits: 128, 64, 32, 16, 8, 4, 2, 1.
- Binary to decimal: add the place values where there is a 1.
- Decimal to binary: find which place values add up to the number.
- n bits can represent 2ⁿ different values. A byte (8 bits) represents 256 values.
Worked examples
Example 1: Binary to decimal
Question: Convert 1011 to decimal.
- Place values: 8, 4, 2, 1.
- 1011 means 8 + 0 + 2 + 1.
- 8 + 2 + 1 = 11.
Answer: 11
Example 2: Decimal to binary
Question: Convert 13 to binary.
- 13 = 8 + 4 + 1.
- Put 1s at 8, 4 and 1, and 0 at 2: 1101.
Answer: 1101
Example 3: Binary addition
Question: Add 0101 and 0011.
- 0101 is 5 and 0011 is 3.
- 5 + 3 = 8, which is 1000 in binary.
Answer: 1000 (decimal 8)
Common mistakes
- Reading the place values from left to right incorrectly.
- Forgetting leading zeros when a fixed number of bits is required.
- Confusing bits and bytes.
- Making carry errors in binary addition.
Practice questions
Frequently asked questions
How many values can one byte store?
256 (from 0 to 255), because 2 to the power of 8 is 256.
How many values can one byte store?
256, from 0 to 255, because 2 to the power of 8 is 256.
Related guides
How the internet works: IP addresses, DNS and packets
Learn what happens when you open a website, from DNS lookups to packets and HTTPS, in plain English.
KS3GCSEMiddle SchoolHigh SchoolBinary search and bubble sort: searching and sorting algorithms
Learn how linear search, binary search and bubble sort work, with step-by-step traces and when to use each.
GCSEA-LevelHigh SchoolProgramming basics: variables, if statements and loops
Understand variables, data types, selection and loops, with pseudocode examples you can trace by hand.
KS3GCSEMiddle SchoolHigh SchoolSources and review
Reviewed by StudyMorrow editorial review on 5 Nov 2026.