Base Converter
Conversion Results
All Base Representations
| Base | Value |
|---|---|
| Binary (Base 2) | 0b11111111 |
| Octal (Base 8) | 0o377 |
| Decimal (Base 10) | 255 |
| Hexadecimal (Base 16) | 0xFF |
A Base Converter is a tool that transforms numbers between different numeral systems (bases). This is essential in computer science, digital electronics, and mathematics where numbers are represented in various formats like binary (base-2), decimal (base-10), hexadecimal (base-16), and octal (base-8).
Common Number Bases
| Base | Name | Digits | Usage |
|---|---|---|---|
| 2 | Binary | 0-1 | Computer systems, digital circuits |
| 8 | Octal | 0-7 | Unix file permissions, older systems |
| 10 | Decimal | 0-9 | Everyday arithmetic |
| 16 | Hexadecimal | 0-9, A-F | Programming, memory addressing |
How Base Conversion Works
1. Converting from Base-N to Decimal (Base-10)
Each digit is multiplied by its positional value (base^position) and summed.
Formula:
Example: Convert binary 1011 to decimal
2. Converting from Decimal to Base-N
Repeated division by the target base, collecting remainders in reverse order.
Steps:
Divide the number by the target base.
Record the remainder.
Repeat with the quotient until it reaches 0.
The converted number is the remainders read in reverse.
Example: Convert 25 to binary (base-2)
→ Binary = 11001 (read remainders upwards)
3. Direct Conversions Between Non-Decimal Bases
A. Binary ↔ Hexadecimal: Group binary digits into 4-bit nibbles.10101100→1010 1100→A C→AC(hex)
101101→101 101→5 5→55(octal)
Base Conversion Table (0-15)
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
Applications
- Programming: Memory addresses in hex (
0xFF), bitwise operations. - Networking: IP addresses in binary (
11000000.10101000...). - Encryption: Large numbers in different bases for cryptography.
- Digital Circuits: Binary logic gates, FPGA programming.
Online Base Converters
- RapidTables Base Converter
- Calculator.net Base Calculator
- CyberChef (Advanced Conversions)
Example Conversions
Hex
2Fto Decimal:Decimal
42to Binary:→ Binary =
101010