Base Converter
Convert numbers between different bases (binary, octal, decimal, hexadecimal, and custom bases up to 36).
A number base (or radix) determines how many unique digits are used to represent numbers. In base 10 (decimal), we use digits 0-9. In base 2 (binary), we use only 0 and 1. In base 16 (hexadecimal), we use 0-9 and A-F to represent values 0-15.
Common Bases: Binary (base 2) is fundamental to computing since computers use two states (on/off). Octal (base 8) and hexadecimal (base 16) are convenient shorthand for binary, as each octal digit represents 3 binary digits and each hex digit represents 4 binary digits.
Conversion Process: To convert between bases, the number is first converted to decimal (base 10) by multiplying each digit by its positional value (base^position), then converted to the target base by repeatedly dividing by the new base and collecting remainders.
Example: Converting 1010 (binary) to decimal: 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 0 + 2 + 0 = 10. Converting 10 (decimal) to hexadecimal: 10 ÷ 16 = 0 remainder 10 (A), so 10 in decimal = A in hexadecimal.
Extended Bases: This calculator supports bases from 2 to 36, using digits 0-9 and letters A-Z to represent values 0-35. Base 36 is the maximum because it uses all 10 digits and 26 letters of the English alphabet.
Applications: Base conversion is essential in computer science for understanding memory addresses, color codes (hex), file permissions (octal), network addresses, and low-level programming. BigInt support allows conversion of arbitrarily large numbers without precision loss.
Frequently Asked Questions
What is a number base or radix?
A number base (or radix) defines how many unique digits are used to represent numbers. Base 10 (decimal) uses 0-9, base 2 (binary) uses 0-1, base 16 (hexadecimal) uses 0-9 and A-F. The position of each digit determines its value as a power of the base.
Why are binary, octal, and hexadecimal important in computing?
Binary (base 2) directly represents how computers store data using on/off electrical states. Hexadecimal (base 16) provides a compact way to represent binary - each hex digit equals exactly 4 binary digits. Octal (base 8) was historically used in older systems and Unix file permissions, where each digit represents 3 binary digits.
How do I convert between different number bases?
To convert from any base to decimal: multiply each digit by the base raised to its position power (rightmost is 0). To convert from decimal to another base: repeatedly divide by the target base and collect remainders in reverse order. This calculator handles conversions automatically for bases 2 through 36.
What is base 36 and when is it used?
Base 36 is the highest practical base using alphanumeric characters (0-9 for values 0-9, A-Z for values 10-35). It's used to create short, readable identifiers like URL shorteners, tracking codes, and unique IDs. For example, YouTube video IDs use a similar encoding scheme to pack more information into fewer characters.