Number Base Converter

Free number base converter. Convert between binary, octal, decimal, and hexadecimal instantly. Learn how each number system works.

Free Tool No Sign-up Instant Results

Base Converter

Comprehensive Guide: Number Base Systems (Binary, Octal, Decimal & Hexadecimal)

Master positional notation, radix conversion algorithms, repeated division by radix, binary nibbles, and computer hardware data representations.

1

1. Positional Notation & Radix Foundations

A radix (or base) specifies the number of unique glyphs or digits used in a positional numeral system. In base b, the value of a number string dₖ...d₁d₀ is determined by multiplying each digit by its corresponding power of the base:

Value = (dₖ × bᵏ) + ... + (d₂ × b²) + (d₁ × b¹) + (d₀ × b⁰)

In computer architecture, the four dominant bases are: Binary (Base 2), Octal (Base 8), Decimal (Base 10), and Hexadecimal (Base 16).

2

2. Standard Computer Science Radix Systems Comparison

Radix / Base Allowed Digits / Symbols Primary Engineering Domain
Base 2 (Binary)0, 1Digital logic gates, CPU transistors, machine code
Base 8 (Octal)0, 1, 2, 3, 4, 5, 6, 7Unix file system permissions (e.g. chmod 755)
Base 10 (Decimal)0 through 9Human commerce and international mathematics
Base 16 (Hexadecimal)0–9 and A, B, C, D, E, FMemory addresses, web CSS color codes (#0df2fe)
3

3. Graduated Step-by-Step Worked Problems

Problem 1: Decimal to Binary (Repeated Division by 2)

Convert decimal 156 into binary representation:

• 156 ÷ 2 = 78 remainder 0
• 78 ÷ 2 = 39 remainder 0
• 39 ÷ 2 = 19 remainder 1
• 19 ÷ 2 = 9 remainder 1
• 9 ÷ 2 = 4 remainder 1
• 4 ÷ 2 = 2 remainder 0
• 2 ÷ 2 = 1 remainder 0
• 1 ÷ 2 = 0 remainder 1
Read remainders from bottom to top: 10011100₂.
Result: 156₁₀ = 10011100₂.

Problem 2: Hexadecimal to Decimal Conversion

Convert hexadecimal 2AF₁₆ to decimal:
Hex symbols: A = 10, F = 15.
• Value = (2 × 16²) + (10 × 16¹) + (15 × 16⁰).
• Value = (2 × 256) + (10 × 16) + (15 × 1) = 512 + 160 + 15 = 687.
Result: 2AF₁₆ = 687₁₀.

Problem 3: Direct Octal to Binary Conversion

Convert octal 752₈ directly to binary without intermediate decimal steps:
• Each octal digit maps to 3 binary bits: 7 = 111₂, 5 = 101₂, 2 = 010₂.
• Concatenate triples: 111 101 010₂.
Result: 752₈ = 111101010₂.

4

4. The Binary-to-Hex Nibble Shortcut

Because 16 = 2⁴, exactly 4 binary bits (known in computer engineering as a nibble) map directly onto 1 hexadecimal digit. To convert binary to hex, group bits into sets of 4 from right to left:

1101 1010₂ ⟹ 1101 = D (13), 1010 = A (10) ⟹ DA₁₆. This elegant direct mapping avoids tedious intermediate decimal calculations.

5

5. Frequently Asked Questions (FAQ)

Why do computers use binary instead of decimal?

Electronic transistors operate most reliably as two-state on/off switches (high voltage vs. low voltage). Binary (0 and 1) maps directly onto these physical hardware states, minimizing noise interference and signal corruption.

What are alphanumeric digits in bases above 10 (Base-36)?

When a radix exceeds 10, standard Arabic numerals (0–9) run out. Letters of the alphabet are recruited: A = 10, B = 11, ... Z = 35. Base-36 uses all digits 0–9 and all letters A–Z, commonly utilized in URL shorteners.

What is Base64 encoding used on the web?

Base64 encodes raw binary files (images, certificates) into 64 ASCII printable characters (A–Z, a–z, 0–9, +, /) so they can be transmitted safely across text-based network protocols like HTTP and email without byte alteration.