ES
navigate Enter open Esc close
Number Base Converter

Binary, Decimal, Octal & Hexadecimal Converter

Instantly convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Built with arbitrary-precision BigInt, bit-length counters, and ASCII analysis.

Your numerical values are converted 100% locally in your browser using high-precision BigInt. No data is sent to our servers.

Simultaneous Real-Time Conversion

Quick presets:
Binary (Base 2)
Octal (Base 8)
Decimal (Base 10)
Hexadecimal (Base 16)
Bit length
Bytes required
ASCII character

Need to perform arithmetic or bitwise operations?

Add, subtract, and use AND, OR, XOR, NOT and shifts with numbers in different bases.

Complete Guide to Positional Number Bases & Conversion

In digital computing, computer science, and data engineering, numeric values are stored as electronic signals in distinct numeral bases. Converting accurately between Binary (base 2), Octal (base 8), Decimal (base 10), and Hexadecimal (base 16) is a core foundation for low-level software design, network payload inspection, memory dump analysis, and hardware programming.

1. Understanding Positional Number Systems

2. Number Base Equivalence Table (0 to 15 / 0 to F)

Decimal (Base 10) Binary (Base 2 - 4 bits) Octal (Base 8) Hexadecimal (Base 16)
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

3. Manual Conversion Methods

Hexadecimal to Binary: Substitute every hex character with its 4-bit binary nibble. For example, 0x2D: 2 = 0010, D (13) = 110100101101 (or 101101).

Binary to Decimal: Multiply each bit by its positional power of 2 starting from position 0 on the right. For 101101: $(1 \times 32) + (0 \times 16) + (1 \times 8) + (1 \times 4) + (0 \times 2) + (1 \times 1) = 32 + 8 + 4 + 1 = 45$.

Decimal to Hexadecimal: Repeatedly divide the decimal integer by 16 and record the integer remainders. Read remainders from bottom to top.

Binary to Octal: Group bits into clusters of 3 starting from the right (pad with leading zeros if needed). Each 3-bit chunk converts into a single octal digit (e.g., 101 10155 in octal = 45 in decimal).

4. Standard Programming Prefixes

Frequently Asked Questions about Number Base Conversion

How do you convert binary to decimal?

Multiply each binary digit by $2^n$ (where $n$ is the 0-indexed position starting from the rightmost bit) and add all products. For example, 1010 = $(1 \times 2^3) + (0 \times 2^2) + (1 \times 2^1) + (0 \times 2^0) = 8 + 0 + 2 + 0 = 10$.

What does the "0x" prefix mean in hexadecimal numbers?

The 0x prefix is a programming standard (used in C, C++, JavaScript, Python, Rust, and Java) to explicitly indicate that the subsequent digits represent a hexadecimal base-16 number rather than a decimal value.

Why does hexadecimal use letters A through F?

Base 16 requires 16 distinct single-digit symbols. Since Arabic numerals only provide 10 digits (0–9), the letters A (10), B (11), C (12), D (13), E (14), and F (15) are used to represent numbers from 10 to 15 in a single character.

Can this converter handle large numbers beyond 64 bits?

Yes. The converter is built with native JavaScript BigInt mathematics, allowing arbitrary-precision integer conversions with 100% exactness without floating-point overflow or rounding errors.

What is an octal number and where is it used today?

An octal number uses base 8 with digits 0 to 7. Since each octal digit corresponds to 3 binary bits, octal is widely utilized in Unix file permission representations (e.g. read, write, execute permissions in chmod 755).

Share this tool

Help others by sharing this free tool.