Ad Space — Top Banner

Number Base Converter

Convert numbers between any base from 2 to 36 including binary, octal, decimal, and hex.
Returns the converted value with digit-by-digit working shown.

Converted Number

Number base conversion is the process of expressing a number in a different positional numeral system. Computers use binary (base 2) internally; programmers use hexadecimal (base 16) for readability; humans use decimal (base 10) by default; octal (base 8) is used in Unix file permissions.

Formula — Any base to decimal: Decimal Value = Σ(Digit × Base^Position) (Position counts from 0 starting at the rightmost digit)

Formula — Decimal to any base:

  1. Divide the decimal number by the target base
  2. Record the remainder
  3. Divide the quotient by the base again
  4. Repeat until quotient = 0
  5. Read remainders from bottom to top

Hex digit mapping: 10=A, 11=B, 12=C, 13=D, 14=E, 15=F

Worked example — Binary to Decimal: Binary: 1101₂ = (1×2³) + (1×2²) + (0×2¹) + (1×2⁰) = 8 + 4 + 0 + 1 = 13₁₀

Worked example — Decimal to Hexadecimal: Decimal: 255 255 ÷ 16 = 15 remainder 15 (F) 15 ÷ 16 = 0 remainder 15 (F) Result (read bottom to top): FF₁₆

Quick reference — Common values:

Decimal Binary Octal Hex
0 0000 0 0
8 1000 10 8
10 1010 12 A
15 1111 17 F
16 10000 20 10
255 11111111 377 FF
256 100000000 400 100

Applications: Color codes (#FF6600 = RGB 255, 102, 0), IP addresses, memory addresses, Unix permissions (chmod 755 = binary 111 101 101).


Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.