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 way of writing numbers using a fixed set of digits and a base (also called radix). The base tells you how many unique digits are used before you move to the next place value.
In everyday life, we use the decimal system (base 10) with digits 0–9. Computers, however, work with electrical signals that are naturally on or off. That makes binary (base 2) the native language of digital hardware. Programmers and engineers also use octal (base 8) and hexadecimal (base 16) because they compactly represent binary patterns.
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
A single wire in a circuit can be in one of two stable states: high voltage (1) or low voltage (0). Building reliable circuits for ten distinct voltage levels is far harder than distinguishing two states. That is why processors, RAM, and storage all store data as binary digits — bits.
When you type a letter on your keyboard, the character is encoded as binary. When you save a photo, every pixel’s colour values are stored as binary numbers. Even high-level programming languages eventually compile down to machine instructions represented in binary.
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 Conversions
- Start from decimal when comparing bases — it is the reference most people already understand.
- Group binary in blocks of 4 when converting to hex, and blocks of 3 for octal.
- Always verify with a trusted converter when practising for exams.
- Write place values above each digit until the method becomes automatic.
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.
Share this article
Learn Faster with Numverto
Explore free number system converters, binary tools, EMI calculators, GST calculators, and educational guides.
About Numverto
Numverto Editorial Team
Numverto publishes educational content about number systems, computer science concepts, binary arithmetic, financial calculations, EMI formulas, GST calculations, and practical learning resources for students and professionals.
Article Metadata
Tags: number-systems, binary, education
Last Updated: June 2026
Related Calculators
Related Articles
17 June 2026
What is 1's Complement and 2's Complement in Binary?
Learn 1's complement and 2's complement with simple explanations, step-by-step examples, and practice problems for BCA/BTech exams.
Read article →15 June 2026
How to Convert Decimal to Binary — Easy Method with Examples
Learn the repeated division method to convert decimal numbers to binary. Step-by-step examples, practice problems, and a free online converter tool.
Read article →14 June 2026
BCD (Binary Coded Decimal) — What It Is and How to Convert
Learn Binary Coded Decimal (BCD) encoding with step-by-step conversion examples. Understand 8421 BCD, packed vs unpacked BCD, and applications in digital systems.
Read article →