Convert Between Number Bases
Enter a number in any base and instantly see conversions to all other bases.
Binary (Base 2)
Octal (Base 8)
Decimal (Base 10)
Hexadecimal (Base 16)
Binary Bit Visualization
Quick Conversions
Base Operations
Addition
Add numbers in any base with automatic conversion
Subtraction
Subtract numbers in any base
Multiplication
Multiply numbers in any base
Division
Divide numbers in any base
Understanding Number Bases: A Complete Guide
Number bases, also called radices, are fundamental to mathematics and computer science. Different bases are used for different purposes, from everyday decimal calculations to computer binary operations.
What is a Number Base?
A number base indicates how many digits are available in a number system and how positional notation works. In base-b, numbers are represented using digits from 0 to b-1.
Positional Notation Formula:
Number = dโ ร bโฟ + dโโโ ร bโฟโปยน + ... + dโ ร bยน + dโ ร bโฐ
Where d are digits and b is the base.
Common Number Bases Explained
| Base | Digits | Uses | Example |
|---|---|---|---|
| Binary (Base 2) | 0, 1 | Computer hardware, digital electronics | 1011โ = 11โโ |
| Octal (Base 8) | 0-7 | Unix permissions, older systems | 755โ = 493โโ |
| Decimal (Base 10) | 0-9 | Everyday mathematics, commerce | 255โโ |
| Hexadecimal (Base 16) | 0-9, A-F | Programming, memory addresses, color codes | FFโโ = 255โโ |
Conversion Methods
Decimal to Binary
- Divide the number by 2
- Record the remainder (0 or 1)
- Use the quotient as new number
- Repeat until quotient is 0
- Read remainders in reverse order
Example: 13โโ = 1101โ
Binary to Hexadecimal
- Group binary digits in sets of 4 (add leading zeros if needed)
- Convert each group to its hex equivalent
- Concatenate the results
Example: 1101 0110โ = D6โโ
Hexadecimal to Decimal
- Convert each hex digit to its decimal value (A=10, B=11, etc.)
- Multiply each digit by 16โฟ where n is its position from right (starting at 0)
- Sum all results
Example: 1Fโโ = 1ร16 + 15 = 31โโ
Practical Applications
๐ป Programming
Hex used for memory addresses, binary for bitwise operations, decimal for general calculations.
๐จ Web Design
Colors in HTML/CSS: #RRGGBB where RR, GG, BB are hex values (00-FF).
๐ง Computer Science
Binary for logic gates, hex for assembly language, octal for Unix permissions.
๐ Data Storage
Bits and bytes calculations: 1 byte = 8 bits = 2 hex digits.