Number Base Converter: Convert Between Binary, Octal, Decimal, and Hex
Different number systems are used in computing, mathematics, and digital electronics. Binary (base 2) is the language of computers, hexadecimal (base 16) is used for memory addresses and color codes, and octal (base 8) appears in Unix file permissions. Our Number Base Converter instantly converts numbers between any bases from 2 to 36, showing the step-by-step conversion process. Use our Number Base Converter to estimate your costs.
Understanding Number Bases
In everyday life, we use decimal (base 10), which has 10 digits (0-9). Each position in a decimal number represents a power of 10. Binary uses 2 digits (0-1), and each position represents a power of 2. Hexadecimal uses 16 digits (0-9 and A-F), representing powers of 16. Octal uses 8 digits (0-7), representing powers of 8.
The number 42 in decimal means 4 × 10¹ + 2 × 10⁰ = 42. In binary, 101010 means 1 × 2⁵ + 0 × 2⁴ + 1 × 2³ + 0 × 2² + 1 × 2¹ + 0 × 2⁰ = 32 + 0 + 8 + 0 + 2 + 0 = 42. Same value, different representation.
Using the Number Base Converter
Enter a number, select its base, and choose the target base. The calculator shows the converted result and the step-by-step process: first converting to decimal (if needed) by multiplying each digit by its positional value, then converting from decimal to the target base by repeated division.
The calculator supports bases 2 through 36, using digits 0-9 and letters A-Z for bases above 10. It handles integers, fractions, and numbers with decimal points.
Common Number Systems
Binary (Base 2)
Used by all digital computers. Each binary digit (bit) represents an on/off state. 8 bits = 1 byte. Binary is the foundation of all computing but is cumbersome for humans to read, which is why we use hexadecimal as a compact representation.
Octal (Base 8)
Used in Unix/Linux file permission codes (e.g., chmod 755). Each octal digit represents 3 binary bits. Less common today but still appears in some legacy computing contexts.
Hexadecimal (Base 16)
Widely used in programming. Hex color codes (#FF5733), memory addresses (0x7FFF), and Unicode character codes all use hexadecimal. Each hex digit represents 4 binary bits, making it easy to convert between hex and binary.
Decimal (Base 10)
The standard human number system. Used in everyday arithmetic, financial calculations, and most non-technical contexts.
Conversion Shortcuts
- Binary to hex: Group binary digits into sets of 4 (starting from the right), then convert each group to its hex equivalent
- Hex to binary: Convert each hex digit to its 4-bit binary equivalent
- Binary to octal: Group binary digits into sets of 3, then convert each group
- Binary to decimal: Double-and-add method: start from 0, for each binary digit: multiply by 2 and add the digit
- Decimal to binary: Repeatedly divide by 2 and read remainders upward
Real-World Example
Convert the decimal number 255 to other bases:
- Binary: 255 / 2 = 127 r1, 127/2 = 63 r1, 63/2 = 31 r1, 31/2 = 15 r1, 15/2 = 7 r1, 7/2 = 3 r1, 3/2 = 1 r1, 1/2 = 0 r1 → 11111111
- Octal: 255 / 8 = 31 r7, 31/8 = 3 r7, 3/8 = 0 r3 → 377
- Hexadecimal: 255 / 16 = 15 r15, 15/16 = 0 r15 → FF
255 is the maximum value of a single byte. In networking, 255.255.255.0 is a common subnet mask. In hex, FF is the maximum two-digit hex value. All representations describe the same quantity.
Reading All Four Bases at Once
One feature makes this converter especially useful for learning: it always returns every base together. After any conversion, the result panel shows the value in binary, octal, decimal, and hexadecimal simultaneously, regardless of which pair you selected. Converting 10101010 in binary displays 170 in decimal, AA in hex, and 252 in octal in the same view — so you can see the number through all four lenses without re-running anything.
This matters most for spotting patterns. Enter 11111111 and the four representations track the powers of two: 255 (decimal), FF (hex), 377 (octal). The same information appears at four levels of compression — binary with one bit per place, octal packing three bits per digit, hex packing four, and decimal in our familiar base ten. Watch how 42 in decimal becomes 101010 in binary and you can see the doubling structure of the place values directly. The all-at-once panel is also a debugging aid: because the binary and hex views must always agree with each other, an inconsistent input becomes obvious instead of silently producing a wrong answer.
Start Converting
Use our Number Base Converter below to convert between any number systems. Also check our Roman Numeral Converter for converting to and from Roman numerals and our Prime Calculator for number theory tools.
Related Calculators
Use our Number Base Converter Guide together with related tools such as Area Calculator, Combination Calculator, Derivative Calculator to plan more accurately. Each calculator runs instantly in your browser with step-by-step guidance.
Written by the CalcMaster Pro Editorial Team — financial, health, and DIY tools reviewed for accuracy. All calculators run on standard, widely accepted formulas. Always confirm final numbers with a qualified professional for decisions that require official figures.