Number Base Converter

Convert numbers between any bases (2-36)

1010 (base 2) =

10

base 10

Decimal value: 10

All Base Conversions

Binary (Base 2)1010
Ternary (Base 3)101
Quaternary (Base 4)22
Quinary (Base 5)20
Senary (Base 6)14
Septenary (Base 7)13
Octal (Base 8)12
Nonary (Base 9)11
Decimal (Base 10)10
Undecimal (Base 11)A
Duodecimal (Base 12)A
Hexadecimal (Base 16)A
Vigesimal (Base 20)A
Base 32A
Base 36A

Common Bases

Binary (Base 2)

Uses 0-1. Common in computing. Each digit is a bit.

Octal (Base 8)

Uses 0-7. Each digit represents 3 binary bits.

Decimal (Base 10)

Uses 0-9. The standard number system we use daily.

Hexadecimal (Base 16)

Uses 0-9 and A-F. Each digit represents 4 binary bits. Common in programming.

What is a Number Base?

A number base (also called a radix) is the number of unique digits, including zero, used to represent values in a positional numeral system. The base determines how many individual symbols are available and how the position of each digit contributes to the overall value. The most familiar base is decimal (base 10), which uses ten digits (0 through 9). Every position in a decimal number represents a power of 10 — the rightmost position is 10⁰ (ones), the next is 10¹ (tens), then 10² (hundreds), and so on.

Different number bases serve different purposes. Binary (base 2) uses only two digits (0 and 1) and is the fundamental language of digital computers, where each binary digit (bit) represents a switch that is either off or on. Octal (base 8) and hexadecimal (base 16) are commonly used in programming and computer science because they provide a compact representation of binary data — each octal digit represents exactly three binary bits, and each hexadecimal digit represents exactly four bits.

Base conversion is the process of translating a number from one base to another without changing its value. The most common approach is to first convert to decimal (base 10) as an intermediate step, then convert from decimal to the target base. For binary, octal, and hexadecimal, direct conversion methods exist that exploit the power-of-two relationships between these bases.

This number base converter supports conversion between any bases from 2 to 36, using digits 0-9 and letters A-Z as needed for higher bases. It provides instant, accurate conversions with a complete display of the number in all supported bases.

Number Base Conversion

Converting between number bases involves understanding positional notation and the relationship between digits and their values.

Positional Value Formula

Value = dₙ × bⁿ + dₙ₋₁ × bⁿ⁻¹ + ... + d₁ × b¹ + d₀ × b⁰

Where:

  • d= Each digit in the number (0 to b-1)
  • b= The base (radix) of the number system
  • n= The position of the digit (0 for rightmost)

Common Number Bases Reference

Different number bases are used in different contexts, from everyday counting to specialized computing applications.

Base Name Digits Used Common Use
2Binary0, 1Digital computers, logic circuits
8Octal0-7Unix file permissions, compact binary
10Decimal0-9Everyday counting, mathematics
16Hexadecimal0-9, A-FProgramming, memory addresses, colors

How to Use This Calculator

The number base converter provides instant conversion between any bases from 2 to 36:

  1. Select the source base: Choose the base of your input number using the "From Base" dropdown.
  2. Enter the number: Type the number using valid digits for the selected base (e.g., only 0 and 1 for binary, 0-9 and A-F for hexadecimal).
  3. Select the target base: Choose the base you want to convert to using the "To Base" dropdown.
  4. Read the result: The converted value appears instantly, along with the decimal equivalent. The full panel shows the number in all supported bases simultaneously.

Real-World Applications

Number base conversion is essential in computer science and programming. Binary is the native language of computers, with every operation ultimately reduced to binary arithmetic. Programmers frequently work with hexadecimal (base 16) because it provides a compact representation of binary data — a byte (8 bits) can be represented by exactly two hexadecimal digits. Memory addresses, color codes in CSS (#FF5733), and data patterns are all commonly expressed in hexadecimal.

In digital electronics and logic design, binary and octal are used to represent circuit states and logic levels. Engineers working with microprocessors, FPGA designs, and digital signal processing routinely convert between decimal, binary, and hexadecimal. Understanding these conversions is fundamental to debugging hardware, writing firmware, and designing digital systems.

Cryptography and data encoding rely on base conversions for representing encrypted data, hash values, and encoded content. Base64 encoding, commonly used for embedding binary data in text formats like email and JSON, converts binary data to a 64-character ASCII subset. Understanding the relationship between binary, decimal, and other bases is essential for working with these encoding schemes.

Worked Examples

Binary to Decimal Conversion

Problem:

Convert the binary number 1010 to decimal (base 10).

Solution Steps:

  1. 1Write the positional values: 1×2³ + 0×2² + 1×2¹ + 0×2⁰
  2. 2Calculate: 8 + 0 + 2 + 0
  3. 3Sum: 10

Result:

1010 (binary) = 10 (decimal)

Decimal to Hexadecimal Conversion

Problem:

Convert the decimal number 255 to hexadecimal (base 16).

Solution Steps:

  1. 1Divide 255 by 16: 255 ÷ 16 = 15 remainder 15
  2. 2Convert remainders to hex: 15 = F, 15 = F
  3. 3Read remainders from bottom to top: FF

Result:

255 (decimal) = FF (hexadecimal)

Hexadecimal to Binary Conversion

Problem:

Convert the hexadecimal number 3A7 to binary (base 2).

Solution Steps:

  1. 1Convert each hex digit to 4 binary digits
  2. 23 = 0011, A = 1010, 7 = 0111
  3. 3Concatenate: 001110100111

Result:

3A7 (hexadecimal) = 001110100111 (binary)

Tips & Best Practices

  • Each hex digit = 4 binary bits — memorize this for quick conversions
  • Binary 1111 = decimal 15 = hex F — a useful reference point
  • Use hexadecimal for memory addresses and color codes in programming
  • Binary 1000 = decimal 8 — powers of 2 are the foundation of binary
  • Base64 adds ~33% overhead but ensures safe text transmission
  • Octal digits each represent exactly 3 binary bits — useful for Unix permissions

Frequently Asked Questions

Computers use binary because digital circuits have two stable states — on and off, high voltage and low voltage. These states map directly to the two binary digits 0 and 1. Binary is also mathematically simpler for electronic implementation: addition, subtraction, multiplication, and division can all be performed with simple logic gates. Decimal systems would require circuits with ten distinct states, which are much harder to build reliably.
Hexadecimal (base 16) is a number system using digits 0-9 and letters A-F. It is used in programming because each hexadecimal digit represents exactly 4 binary bits, making it a compact representation of binary data. A byte (8 bits) is exactly 2 hexadecimal digits. Programmers use hexadecimal for memory addresses, color codes (CSS: #FF5733), error codes, and debugging because it's easier to read and write than long binary strings.
Binary to hexadecimal: group the binary digits into sets of 4 (from right), convert each group to a hex digit. Hexadecimal to binary: convert each hex digit to its 4-bit binary equivalent. For example, binary 11010110 groups as 1101-0110, which converts to D6 in hex. This direct relationship exists because 16 = 2⁴.
Base64 encoding converts binary data to a 64-character ASCII text representation using characters A-Z, a-z, 0-9, +, and /. It is used to embed binary data in text-based formats like JSON, XML, email (MIME), and data URLs. Base64 increases data size by about 33% but ensures the data can be safely transmitted over text-only channels without corruption.
The most common bases in computing are binary (base 2) for raw data storage and processing, octal (base 8) for Unix file permissions and some legacy systems, decimal (base 10) for human-readable values, and hexadecimal (base 16) for memory addresses, color codes, and debugging. Base64 and Base32 are also used for data encoding in specific applications.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Number Base Converter?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: NIST Guide to SI Units

by National Institute of Standards

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.