What is a Number System? Binary, Octal, Decimal, Hex Explained
A beginner-friendly guide to number systems binary, octal, decimal, and hexadecimal with examples and conversion basics.
What Is a Number System ?
A number system is a method of representing numbers using a specific set of symbols (digits) and a base, also called the radix. The base determines how many unique digits are available before moving to the next place value.
For example, the decimal system uses ten digits (0–9), while the binary system uses only two digits (0 and 1). Although the symbols change from one system to another, the numerical value remains the same.
Number systems are fundamental to mathematics and computer science because they provide different ways to represent and process the same information.
Understanding number systems helps you read memory dumps, debug low-level code, prepare for computer science exams, and use conversion tools with confidence.
Why Computers Use Binary
Computers communicate using billions of tiny electronic switches called transistors. Each transistor has only two stable states: HIGH/ON or LOW/OFF. These two states naturally correspond to the binary digits 1 and 0.
Because hardware only needs to distinguish between two electrical states, binary is far more reliable and efficient than trying to represent numbers using ten different voltage levels.
Whether you’re typing text, watching a video, or running software, everything inside the computer is ultimately stored and processed as binary data.
The Four Common Bases
Decimal (Base 10)
Uses digits 0–9. Each position is a power of 10.
Example: 156 means (1 × 10²) + (5 × 10¹) + (6 × 10⁰) = 100 + 50 + 6 = 156.
Binary (Base 2)
Uses digits 0 and 1. Each position is a power of 2.
Example: 1011 = (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = 8 + 0 + 2 + 1 = 11 in decimal.
Octal (Base 8)
Uses digits 0–7. Each position is a power of 8. Octal is useful because every octal digit maps cleanly to exactly three binary digits.
Example: 13 in octal = (1 × 8¹) + (3 × 8⁰) = 8 + 3 = 11 in decimal. In binary, that is 1011.
Hexadecimal (Base 16)
Uses digits 0–9 and letters A–F (where A = 10, B = 11, … F = 15). Each hex digit represents four binary digits, which is why memory addresses and colour codes often appear in hex.
Example: B in hex = 11 in decimal = 1011 in binary.
One Number, Four Representations
The decimal value 11 looks like this across bases:
| Base | Name | Representation |
|---|---|---|
| 2 | Binary | 1011 |
| 8 | Octal | 13 |
| 10 | Decimal | 11 |
| 16 | Hexadecimal | B |
All four notations describe the same quantity only the way we write it changes.
Digit Ranges by Base
| Base | Name | Valid digits per position |
|---|---|---|
| 2 | Binary | 0, 1 |
| 8 | Octal | 0, 1, 2, 3, 4, 5, 6, 7 |
| 10 | Decimal | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| 16 | Hexadecimal | 0–9, A, B, C, D, E, F |
If a digit falls outside the allowed range for a base, the number is invalid in that system. For example, 128 is not a valid octal number because 8 is not a valid octal digit.
Worked Example 1: Decimal to Binary
Convert 13 to binary.
Divide repeatedly by 2 and collect remainders from bottom to top:
- 13 ÷ 2 = 6 remainder 1
- 6 ÷ 2 = 3 remainder 0
- 3 ÷ 2 = 1 remainder 1
- 1 ÷ 2 = 0 remainder 1
Reading remainders upward: 1101.
Check: (1 × 8) + (1 × 4) + (0 × 2) + (1 × 1) = 13 ✓
Verify instantly with our Number System Converter.
Worked Example 2: Binary to Hexadecimal
Convert 1101 1011 to hexadecimal.
Group bits from the right in sets of four: 1101 and 1011.
1101= 8 + 4 + 0 + 1 = 13 → hex digit D1011= 8 + 0 + 2 + 1 = 11 → hex digit B
Result: DB in hexadecimal.
Worked Example 3: Decimal to BCD
Binary Coded Decimal (BCD) stores each decimal digit as a separate 4-bit binary group. Convert 29 to BCD:
- Digit 2 →
0010 - Digit 9 →
1001
BCD representation: 0010 1001
Learn more with the BCD Converter.
Where You Will See These Systems
- Binary — CPU registers, logic gates, networking bit flags
- Octal — Unix file permissions (e.g.
chmod 755) - Decimal — everyday arithmetic and financial calculations
- Hexadecimal — memory addresses, colour codes (
#2563EB), machine dumps
Text characters also map to numeric codes. The letter A is decimal 65 in ASCII. Explore character codes with the ASCII Converter.
Tips for Learning Number System Conversions
If you’re learning number systems for the first time, these tips can make conversions much easier:
- Learn decimal first because it’s the system you already use every day.
- Memorize powers of 2 (1, 2, 4, 8, 16, 32, 64, 128, 256, 512…) to speed up binary conversions.
- Group binary digits into sets of 3 for octal and 4 for hexadecimal.
- Solve conversions manually first, then verify your answers using a converter.
- Practice regularly with different numbers until the conversion steps become natural.
Common Mistakes Beginners Make
When learning number systems, beginners often make these mistakes:
- Mixing decimal place values with binary place values.
- Using the digit 8 or 9 in octal numbers.
- Forgetting that hexadecimal uses the letters A–F.
- Reading binary digits from left to right without considering powers of two.
- Skipping verification after completing a conversion.
Practicing step-by-step conversions helps avoid these errors.
Frequently Asked Questions
What is the simplest definition of a number system?
A number system is a set of rules for writing numbers using a specific base and digit symbols. The base determines how place values grow from right to left.
Why do programmers use hexadecimal instead of binary?
Hexadecimal is more compact. One hex digit replaces four binary digits, so long binary strings become shorter and easier to read without losing precision.
Is octal still used today?
Yes, though less commonly than hex. Octal appears in legacy systems, embedded programming, and Unix permission notation. It remains an important concept in computer science curricula.
Can a number be valid in one base but invalid in another?
Yes. For example, 19 is valid in decimal but invalid in octal because 9 is not an allowed octal digit.
How can I practise number system conversions quickly?
Use step-by-step tools alongside manual practice. Numverto offers free converters for binary, octal, decimal, hex, BCD, and ASCII with explanations so you can check your working after each attempt.
Free tools
Learn faster with Numverto
Free number system converters, binary tools, EMI calculators, and more, with step-by-step working.
Written by
Numverto Editorial Team
Founder of Numverto. MCA graduate, full-stack developer, and lifelong learner who built this platform so every student gets the explanation, not just the answer.
Related tools
More from Numverto Blog
ieee754
IEEE 754 Floating Point Explained Sign, Exponent & Mantissa
Master IEEE 754 floating point format sign, exponent, mantissa explained with real conversion examples for exams and coding interviews.
13 July 2026
IEEE 754 Standard
Why Does 0.1 + 0.2 Equal 0.30000000000000004? Floating-Point Errors Explained
Understand why computers produce floating-point precision errors, how the IEEE 754 standard stores decimal numbers in binary, why rounding occurs, and the best practices developers use to write accurate, reliable code.
1 July 2026
Discussion