Base Converter

Convert between number bases and perform arithmetic in different bases

Standard Bases

Binary (Base 2)

Digits: 0, 1

Octal (Base 8)

Digits: 0-7

Decimal (Base 10)

Digits: 0-9

Hexadecimal (Base 16)

Digits: 0-9, A-F

Custom Base

Conversion Steps

Arithmetic in Different Bases

Quick Reference: Common Conversions

Powers of 2

Common Values

Hexadecimal Digits

Help

How to convert between bases?

Simply type a number in any base field, and it will automatically convert to all other bases.

Binary: Uses only 0 and 1

Octal: Uses digits 0-7

Decimal: Uses digits 0-9 (our everyday numbers)

Hexadecimal: Uses digits 0-9 and letters A-F (where A=10, B=11, ..., F=15)

What is a number base?

A number base (or radix) determines how many unique digits are used to represent numbers.

In base b, each position represents a power of b:

  • Rightmost position: b⁰ = 1
  • Next position: b¹ = b
  • Next position: b² = b×b
  • And so on...
Why use different bases?

Binary (base 2): Foundation of all digital computing. Computers use binary because electronic circuits have two states (on/off).

Hexadecimal (base 16): Compact representation of binary. Each hex digit represents exactly 4 binary digits, making it easier for humans to read large binary numbers.

Octal (base 8): Another compact binary representation (3 binary digits = 1 octal). Still used in Unix file permissions.

How to read hexadecimal?

Hexadecimal uses 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Letter values:

  • A = 10
  • B = 11
  • C = 12
  • D = 13
  • E = 14
  • F = 15

Example: 2A = 2×16 + 10 = 42 in decimal

Custom bases (2-36)

You can use any base from 2 to 36. For bases larger than 10, letters are used:

  • Base 11: 0-9, A
  • Base 12: 0-9, A, B
  • Base 16: 0-9, A-F (hexadecimal)
  • Base 36: 0-9, A-Z (uses all letters)
Real-world applications

Web colors: #FF0000 is red in hexadecimal (R=255, G=0, B=0)

File permissions: chmod 755 uses octal (rwxr-xr-x)

IPv6 addresses: Use hexadecimal (2001:0db8:85a3::8a2e:0370:7334)

Memory addresses: Usually shown in hexadecimal

Assembly language: Uses hexadecimal for instructions and data