DecimalBinary
Base 10Base 2

Number System Converter

Convert between Binary, Decimal, Octal, and Hexadecimal instantly.

Number Conversion Tools

Convert between Binary, Decimal, Octal, and Hexadecimal with fast and accurate online tools.

Core Fundamentals

Understanding Number Systems & Base Conversion

A number system is a formal mathematical framework for expressing numbers using a consistent set of symbols and positional weighting. In modern computing, mathematics, and digital electronics, positional numeral systems are defined by their radix (or base)—the total number of unique digits used to represent values.

Whether you are writing embedded firmware, debugging network packet headers, configuring Linux file system permissions, or studying computer science algorithms, having a fast and reliable number system converter is essential. Our number base converter supports the four cornerstone bases of digital architecture:

Decimal System (Base 10)

Radix 10

The standard human counting system using digits 0-9. Each position represents an increasing power of 10 (100, 101, 102). Use our decimal converter tools for rapid translation to digital formats.

Binary System (Base 2)

Radix 2

The native language of computer hardware, microprocessors, and memory cells using only 0 and 1. Our specialized binary converter suite simplifies converting binary strings to human-readable numbers.

Octal System (Base 8)

Radix 8

Widely utilized in legacy computer architectures, telecommunications, and Unix/Linux file permissions (chmod 755). A single octal digit cleanly packs exactly 3 binary bits. Leverage our octal converter for quick transformations.

Hexadecimal System (Base 16)

Radix 16

The industry standard for memory addressing, assembly opcodes, IPv6 routing, and web color codes (#3B82F6). Uses digits 0-9 and letters A-F. Our hexadecimal converter delivers instantaneous precision.

Formulas & Logic

How Number System Conversion Works: Methods & Step-by-Step Examples

Performing a manual number system conversion requires applying well-defined mathematical algorithms. Below are the primary methods for converting across Decimal, Binary, Octal, and Hexadecimal.

1. Decimal to Binary Conversion (Successive Division Method)

To perform a decimal to binary conversion and convert decimal to binary manually, follow the repeated division-by-2 method:

  1. Divide the integer decimal number by 2.
  2. Record the integer quotient and the remainder (0 or 1).
  3. Repeat the division with the quotient until the quotient equals zero.
  4. Write down the remainders in reverse order (bottom to top, or most significant bit to least significant bit).
Example: Convert Decimal 29 to Binary:
29 ÷ 2 = 14 with remainder 1 (LSB)
14 ÷ 2 = 7 with remainder 0
7 ÷ 2 = 3 with remainder 1
3 ÷ 2 = 1 with remainder 1
1 ÷ 2 = 0 with remainder 1 (MSB)
Result: 2910 = 111012
Need to perform this repeatedly? Use our dedicated decimal to binary and decimal binary converter tool.

2. Binary to Decimal Conversion (Positional Weighting Method)

To convert binary to decimal, multiply each binary bit by its positional power of two (2n) starting from index n = 0 at the far-right digit:

Example: Convert Binary 110102 to Decimal:
= (1 × 24) + (1 × 23) + (0 × 22) + (1 × 21) + (0 × 20)
= (1 × 16) + (1 × 8) + (0 × 4) + (1 × 2) + (0 × 1)
= 16 + 8 + 0 + 2 + 0
Result: 110102 = 2610
Try our instantaneous binary to decimal converter for multi-digit calculations.

3. Decimal to Hexadecimal & Hexadecimal to Decimal Conversions

For decimal to hexadecimal conversion, divide repeatedly by 16 and replace remainders 10 through 15 with their hexadecimal equivalents: A=10, B=11, C=12, D=13, E=14, F=15.

Conversely, for hexadecimal to decimal conversion, multiply each hex digit by its position's corresponding power of 16 (160, 161, 162, ...) and calculate the sum.

4. Direct Binary, Octal & Hexadecimal Grouping Techniques

Because 8 and 16 are direct powers of 2 (23 = 8 and 24 = 16), you can convert directly between binary and these bases without passing through decimal:

Binary to Octal & Octal to Binary

For binary to octal, split the binary number into 3-bit triplets from right to left. For octal to binary, substitute each octal digit with its 3-bit binary equivalent (e.g., 78 = 1112).

Binary to Hexadecimal & Hex to Binary

For binary to hexadecimal, group bits into 4-bit nibbles from right to left. For hexadecimal to binary, replace each hex character with its 4-bit representation (e.g., F16 = 11112).

Quick Reference

Number Base Conversion Matrix (0 to 20)

Use this master reference table to quickly cross-reference values across all four primary numerical bases:

Decimal (10)Binary (2)Octal (8)Hexadecimal (16)
000000
100011
200102
300113
401004
501015
601106
701117
8100010
9100111
10101012
11101113
12110014
13110115
14111016
15111117
161000020
171000121
181001022
191001123
201010024
Practical Engineering

Real-World Applications of Number Base Systems in Computer Science

Converting numbers between bases is not just an academic exercise—it is fundamental to virtually every modern computing discipline:

1. Memory Addresses & Low-Level Debugging

Hexadecimal is the primary representation for CPU registers, RAM memory pointers (e.g., 0x7FFF5FBFF8A0), and crash stack traces. It condenses 32-bit and 64-bit binary strings into clean, readable notation.

2. Computer Networking & Subnetting

IPv4 addresses like 192.168.1.1 use dotted-decimal notation for human readability, but routing hardware parses them as 32-bit binary strings to evaluate subnet masks (CIDR) and network prefixes.

3. Web Design, CSS & Digital Colors

Every digital color is represented by red, green, and blue light channels (0-255 in decimal). Web browsers encode these as 2-digit hex values, creating standard 6-character hex color codes like #0070F3.

4. Unix & Linux File System Permissions

Read (4), Write (2), and Execute (1) permissions form 3-bit binary masks for user, group, and others, conveniently mapped into 3-digit octal permission codes such as chmod 755.

Knowledge Base & FAQ

Frequently Asked Questions About Number Base Conversions

Everything you need to know about converting between Decimal, Binary, Octal, and Hexadecimal systems.

1How do you convert Decimal to Binary?

To convert a decimal (base-10) number to binary (base-2), use the successive division-by-2 method:

  1. Divide the decimal number by 2.
  2. Record the integer quotient and the remainder (either 0 or 1).
  3. Divide the new quotient by 2 and record the next remainder.
  4. Repeat this process until the quotient reaches 0.
  5. Read the remainders in reverse order (from bottom to top / last remainder to first).

Example: Convert 1310 to Binary:

13 ÷ 2 = 6, remainder 1 (LSB)
6 ÷ 2 = 3, remainder 0
3 ÷ 2 = 1, remainder 1
1 ÷ 2 = 0, remainder 1 (MSB)
Result: 1310 = 11012
2How do you convert Decimal to Octal?

To convert a decimal (base-10) number to octal (base-8), apply the successive division-by-8 method:

  1. Divide the decimal value by 8.
  2. Record the integer quotient and remainder (digits 0 through 7).
  3. Continue dividing the resulting quotients by 8 until the quotient equals 0.
  4. Write the remainders in reverse order (bottom to top).

Example: Convert 15610 to Octal:

156 ÷ 8 = 19, remainder 4 (LSB)
19 ÷ 8 = 2, remainder 3
2 ÷ 8 = 0, remainder 2 (MSB)
Result: 15610 = 2348
3How do you convert Decimal to Hexadecimal?

To convert a decimal (base-10) number to hexadecimal (base-16), use the successive division-by-16 method:

  1. Divide the decimal number by 16.
  2. Record the remainder (0–15). For remainders 10 through 15, convert them to hex symbols: 10=A, 11=B, 12=C, 13=D, 14=E, 15=F.
  3. Repeat dividing the quotient by 16 until the quotient becomes 0.
  4. Read the hex digits in reverse order (bottom to top).

Example: Convert 42310 to Hexadecimal:

423 ÷ 16 = 26, remainder 7 (LSB)
26 ÷ 16 = 1, remainder 10 → A
1 ÷ 16 = 0, remainder 1 (MSB)
Result: 42310 = 1A716
4How do you convert Binary to Decimal?

To convert a binary (base-2) number to decimal (base-10), use the positional weighting method:

  1. Assign each bit a power of 2, starting with 20 at the far-right bit (index 0) and increasing by 1 to the left (21, 22, 23, ...).
  2. Multiply each bit (0 or 1) by its corresponding power of 2.
  3. Add all the resulting products together to obtain the decimal sum.

Example: Convert Binary 101102 to Decimal:

= (1 × 24) + (0 × 23) + (1 × 22) + (1 × 21) + (0 × 20)
= (1 × 16) + (0 × 8) + (1 × 4) + (1 × 2) + (0 × 1)
= 16 + 0 + 4 + 2 + 0
Result: 101102 = 2210
5How do you convert Binary to Octal?

Because 8 is 23, you can convert binary directly to octal without calculating decimal values:

  1. Divide the binary digits into groups of 3 bits starting from the far right (least significant bit).
  2. If the leftmost group has fewer than 3 bits, add leading zeros to complete the group of three.
  3. Convert each 3-bit triplet into its octal digit equivalent (000=0, 001=1, 010=2, 011=3, 100=4, 101=5, 110=6, 111=7).

Example: Convert Binary 11010112 to Octal:

1. Split into 3-bit groups: [001] [101] [011]
2. Map to octal digits: 001 → 1, 101 → 5, 011 → 3
Result: 11010112 = 1538
6How do you convert Binary to Hexadecimal?

Because 16 is 24, every 4 binary bits (one nibble) map directly to one hexadecimal symbol:

  1. Split the binary string into groups of 4 bits starting from the rightmost bit.
  2. Pad the leftmost group with leading zeros if it contains fewer than 4 bits.
  3. Convert each 4-bit group to its hex symbol (0000=0 ... 1001=9, 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F).

Example: Convert Binary 11110102 to Hexadecimal:

1. Split into 4-bit groups: [0111] [1010] (padded with leading 0)
2. Map to hex characters: 0111 → 7, 1010 → A
Result: 11110102 = 7A16
7How do you convert Octal to Decimal?

To convert an octal (base-8) number to decimal (base-10), use positional notation with powers of 8:

  1. Identify each digit's position index starting with 0 on the far right (80=1, 81=8, 82=64, 83=512, ...).
  2. Multiply each octal digit by its positional power of 8.
  3. Sum all products to get the decimal equivalent.

Example: Convert Octal 3458 to Decimal:

= (3 × 82) + (4 × 81) + (5 × 80)
= (3 × 64) + (4 × 8) + (5 × 1)
= 192 + 32 + 5
Result: 3458 = 22910
8How do you convert Octal to Binary?

To convert octal (base-8) directly to binary (base-2), translate each octal digit into its corresponding 3-bit binary sequence:

  1. Convert each octal digit (0–7) into a 3-bit binary group: 0=000, 1=001, 2=010, 3=011, 4=100, 5=101, 6=110, 7=111.
  2. Concatenate the 3-bit groups in the exact order of the original digits.
  3. Drop any unnecessary leading zeros from the final binary result.

Example: Convert Octal 628 to Binary:

6 → 110
2 → 010
Result: 628 = 1100102
9How do you convert Octal to Hexadecimal?

The most efficient way to convert octal (base-8) to hexadecimal (base-16) is by using binary as a bridge:

  1. Convert each octal digit into its 3-bit binary equivalent.
  2. Group the combined binary string into 4-bit sets starting from the right.
  3. Pad the leftmost group with leading zeros if needed.
  4. Convert each 4-bit group into its corresponding hexadecimal character (0-9, A-F).

Example: Convert Octal 1578 to Hexadecimal:

1. Octal to Binary: 1→001, 5→101, 7→111 → 001101111
2. Regroup into 4-bit nibbles: [0110] [1111]
3. Convert to Hex: 0110 → 6, 1111 → F
Result: 1578 = 6F16
10How do you convert Hexadecimal to Decimal?

To convert hexadecimal (base-16) to decimal (base-10), use positional weights based on powers of 16:

  1. Map letter digits to numbers: A=10, B=11, C=12, D=13, E=14, F=15.
  2. Assign powers of 16 to each position starting at 0 on the far right (160=1, 161=16, 162=256, 163=4096, ...).
  3. Multiply each digit's value by its positional power of 16 and sum the products.

Example: Convert Hexadecimal 2B416 to Decimal:

= (2 × 162) + (B × 161) + (4 × 160)
= (2 × 256) + (11 × 16) + (4 × 1)
= 512 + 176 + 4
Result: 2B416 = 69210
11How do you convert Hexadecimal to Binary?

To convert hexadecimal (base-16) directly to binary (base-2), convert each hex character to its 4-bit binary representation:

  1. Translate each hex symbol into 4 binary bits: 0=0000, 1=0001 ... 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111.
  2. Combine the 4-bit nibbles in order.
  3. Trim any leading zeros from the final binary number.

Example: Convert Hexadecimal 3C16 to Binary:

3 → 0011
C → 1100
Result: 3C16 = 001111002 (or 1111002)
12How do you convert Hexadecimal to Octal?

To convert hexadecimal (base-16) to octal (base-8), use binary as an intermediate bridge:

  1. Convert each hex character into its 4-bit binary representation.
  2. Regroup the resulting binary string into groups of 3 bits starting from the far right.
  3. Pad the leftmost group with leading zeros if it has fewer than 3 bits.
  4. Translate each 3-bit group into its octal digit (0–7).

Example: Convert Hexadecimal A916 to Octal:

1. Hex to Binary: A → 1010, 9 → 1001 → 10101001
2. Regroup in 3-bit sets: [010] [101] [001] (padded with leading 0)
3. Map to Octal: 010 → 2, 101 → 5, 001 → 1
Result: A916 = 2518
13Can I convert between Binary, Decimal, Octal, and Hexadecimal?

Yes, absolutely. Decimal (Base 10), Binary (Base 2), Octal (Base 8), and Hexadecimal (Base 16) are simply different radix representations of identical numerical quantities.

You can convert between any pair of systems using these primary strategies:

  • To/From Decimal: Use successive division (decimal to any base) or positional power multiplication (any base to decimal).
  • Direct Bit Grouping: Convert directly between Binary, Octal (3-bit groups), and Hexadecimal (4-bit groups) without converting to Decimal first.
  • Instant Conversion Tools: Use our free online multi-base converter for real-time calculation with full step-by-step mathematical breakdowns.