Base Converter

Advanced Base Converter

Advanced Base Converter

Convert between binary, octal, decimal, hexadecimal and more

Input Value

Options

About Number Bases:

Number bases represent numbers using different radixes. Common bases include binary (2), octal (8), decimal (10), and hexadecimal (16).

Learn more about number bases

Conversion Results

FF
Base Value
Binary (Base 2) 11111111
Octal (Base 8) 377
Decimal (Base 10) 255
Hexadecimal (Base 16) FF

Binary Representation

11111111
MSB LSB

Input Base

Base 10

Output Base

Base 16

Bit Length

8 bits

Format Example
Binary Prefix 0b11111111
Octal Prefix 0o377
Hexadecimal Prefix 0xFF
Formatted Binary 1111_1111

Number Base Examples

Common values in different number bases for reference:

Decimal Binary Octal Hexadecimal Base32 Base64
0000AA
1111BB
21022CC
31133DD
410044EE
510155FF
611066GG
711177HH
81000108II
91001119JJ
10101012AKK
15111117FPP
16100002010QAQ
3111111371FZf
321000004020BAg
63111111773FPZ/
64100000010040BAABA
100110010014464D4ZG
12711111111777FFZf/
1281000000020080GAAgA
25511111111377FFPZ/w
256100000000400100QAABA
5111111111117771FFPZZ//
51210000000001000200BAAABAA
1023111111111117773FFPZZZ//8
1024100000000002000400BAAAABBA
20471111111111137777FFPZZZZ//8
20481000000000004000800BAAAAABCA
40951111111111117777FFFPZZZZZ///
40961000000000000100001000BAAAAAABDA



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

BaseNameDigitsUsage
2Binary0-1Computer systems, digital circuits
8Octal0-7Unix file permissions, older systems
10Decimal0-9Everyday arithmetic
16Hexadecimal0-9, A-FProgramming, 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:

Decimal=dn×bn+dn1×bn1+...+d0×b0

Example: Convert binary 1011 to decimal

1×23+0×22+1×21+1×20=8+0+2+1=1110

2. Converting from Decimal to Base-N

Repeated division by the target base, collecting remainders in reverse order.

Steps:

  1. Divide the number by the target base.

  2. Record the remainder.

  3. Repeat with the quotient until it reaches 0.

  4. The converted number is the remainders read in reverse.

Example: Convert 25 to binary (base-2)

25÷2=12 R112÷2=6 R06÷2=3 R03÷2=1 R11÷2=0 R1

→ Binary = 11001 (read remainders upwards)


3. Direct Conversions Between Non-Decimal Bases

  • Binary ↔ Hexadecimal: Group binary digits into 4-bit nibbles.

    • 10101100 → 1010 1100 → A C → AC (hex)

  • Binary ↔ Octal: Group binary digits into 3-bit chunks.

    • 101101 → 101 101 → 5 5 → 55 (octal)


Base Conversion Table (0-15)

DecimalBinaryOctalHexadecimal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

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

  1. Hex 2F to Decimal:

    2×161+15×160=32+15=4710
  2. Decimal 42 to Binary:

    42÷2=21R021÷2=10R110÷2=5R05÷2=2R12÷2=1R01÷2=0R1

    → Binary = 101010