Logo

MonoCalc

/

Decimal Base Converter

Encode/Decode

Conversion Results

Base 2

Binary

11111111

Base 8

Octal

377

Base 10

Decimal

255

Base 16

Hexadecimal

FF

Custom Conversion

Decimal (Base 10)

255

Binary (Base 2)

11111111

Bit Visualization

1
1
1
1
1
1
1
1

1 (set bit)

0 (unset bit)

8 set bits · 8 total bits

Step-by-step Breakdown(DecimalBinary)

Integer Part (Repeated Division by 2)

Dividend÷ BaseQuotientRemainderDigit
255÷ 212711
127÷ 26311
63÷ 23111
31÷ 21511
15÷ 2711
7÷ 2311
3÷ 2111
1÷ 2011

Read remainders from bottom to top → 11111111

Quick Reference Table (0–15)

DecBinOctHex
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

About This Tool

🔢 Decimal Base Converter – Convert Between Any Number Systems

The Decimal Base Converter is an essential tool for developers, computer science students, and engineers who work with different numeral systems. It converts numbers between decimal (base-10), binary (base-2), octal (base-8), hexadecimal (base-16), and any arbitrary base from 2 to 36 — with full support for fractional numbers and step-by-step algorithmic breakdowns.

📐 How Number Base Conversion Works

Every number system is a positional notation system, meaning the value of each digit depends on its position (its "place value"). The base determines how many unique digit symbols the system uses before "rolling over" to the next position.

For example, decimal (base-10) uses digits 0–9, while hexadecimal (base-16) uses 0–9 plus letters A–F (where A=10, B=11, … F=15).

⚙️ Core Conversion Algorithms

Decimal → Target Base (Integer Part)

The standard algorithm repeatedly divides the number by the target base and collects the remainders in reverse order:

255 ÷ 2 = 127  remainder 1
127 ÷ 2 = 63   remainder 1
 63 ÷ 2 = 31   remainder 1
 31 ÷ 2 = 15   remainder 1
 15 ÷ 2 = 7    remainder 1
  7 ÷ 2 = 3    remainder 1
  3 ÷ 2 = 1    remainder 1
  1 ÷ 2 = 0    remainder 1
→ Binary: 11111111

Any Base → Decimal

To convert from another base to decimal, use positional notation — multiply each digit by the base raised to the power of its position and sum them all:

FF (hex) = 15 × 16¹ + 15 × 16⁰
         = 240 + 15
         = 255 (decimal)

Cross-Base Conversion

Converting between two non-decimal bases (e.g., binary to octal) uses a two-step pipeline: source base → decimal → target base. The intermediate decimal value is shown in the step-by-step panel.

Fractional Number Conversion

Fractional parts are converted using repeated multiplication. Multiply the fractional part by the target base repeatedly, collecting the integer parts of each product:

Convert 0.625 (decimal) to binary:
0.625 × 2 = 1.25  → digit 1
0.25  × 2 = 0.5   → digit 0
0.5   × 2 = 1.0   → digit 1
→ 0.101 (binary)

🖥️ Why Number Bases Matter in Computing

Understanding number bases is fundamental to computer science and low-level programming. Here is how each common base is used in practice:

  • Binary (Base 2): The native language of computers. Every piece of data — from text to images to programs — is ultimately stored as sequences of 0s and 1s. Understanding binary is essential for bitwise operations, CPU registers, memory addressing, and network protocols.
  • Octal (Base 8): Once common in older computing systems, octal is still used today for Unix/Linux file permissions. A permission mask like chmod 755 is an octal number where each digit encodes three permission bits (read, write, execute).
  • Hexadecimal (Base 16): The most practical shorthand for binary. Each hex digit encodes exactly four binary bits (a "nibble"), making it compact and readable. Hex is used everywhere: memory addresses, RGB color codes (#FF6B00), SHA hashes, IPv6 addresses, and assembly language.
  • Custom Bases (2–36): Base-36 uses all digits and letters and is sometimes used for compact identifiers or short URLs. Base-32 is common for encoding data in case-insensitive contexts. Base-60 (sexagesimal) historically underlies our time and angle measurement systems.

📊 Binary and Hex Relationship

Because 16 = 2⁴, each hex digit corresponds to exactly 4 binary bits (a nibble), and each octal digit corresponds to exactly 3 binary bits (because 8 = 2³). This makes conversion between these bases trivial — just group the binary digits:

Binary:       1111  1111
Hex:             F     F   → FF
Octal:         011  111  111  → 377

🎯 How to Use This Tool

  1. Enter your number in the Input field. For bases above 10, use digits A–Z (case-insensitive).
  2. Select the source base — the system your input number is written in. Defaults to decimal (10).
  3. Select the target base — the system you want to convert to, or enter a custom base from 2 to 36.
  4. Results appear instantly for all four common bases (binary, octal, decimal, hexadecimal) plus your custom target.
  5. Toggle Show Steps to see the full division/multiplication algorithm, and click any result card to copy it to clipboard.

💡 Tips and Limitations

  • Precision: Integer conversions are exact up to JavaScript's safe integer limit (2⁵³ − 1 ≈ 9 quadrillion). Fractional conversions use floating-point arithmetic and may have small rounding errors, especially for irrational fractions in the target base.
  • Repeating fractions: Just as 1/3 cannot be expressed exactly in decimal, many fractions cannot be represented exactly in binary. For example, 0.1 decimal has an infinitely repeating binary expansion (0.0001100110011…).
  • Bit visualization: The binary output is displayed as a color-coded bit grid, grouped into nibbles (4 bits), for easy reading of byte patterns.
  • Uppercase output: All letters in the output (for bases above 10) are displayed in uppercase by convention (e.g., FF not ff).

Frequently Asked Questions

Is the Decimal Base Converter free?

Yes, Decimal Base Converter is totally free :)

Can I use the Decimal Base Converter offline?

Yes, you can install the webapp as PWA.

Is it safe to use Decimal Base Converter?

Yes, any data related to Decimal Base Converter only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does the Decimal Base Converter work?

Enter any number in the source base field, select the source base (default is decimal/base-10), and the tool instantly converts it to binary (base-2), octal (base-8), hexadecimal (base-16), and any custom base from 2 to 36. The conversion uses standard positional notation arithmetic.

What bases can I convert between?

The tool supports any base from 2 to 36. Common presets include binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16). For bases above 10, letters A–Z are used as digits — for example, base-16 uses A=10 through F=15.

Can I convert fractional or decimal numbers?

Yes. Enter a number with a decimal point (e.g., 10.625) to convert fractional parts. The integer portion is converted via repeated division and the fractional portion via repeated multiplication. You can adjust the precision (number of fractional digits) from 1 to 20.

What is the step-by-step breakdown?

The step-by-step panel shows the full division-remainder algorithm for integer conversion and the multiply-and-extract algorithm for fractional conversion. Each row shows the dividend, divisor, quotient, and remainder so you can follow the math and learn the process.

How large a number can the tool handle?

The tool uses JavaScript's native number arithmetic, safely handling integers up to 2⁵³ − 1 (approximately 9 quadrillion). For very large integers, consider using a BigInt-based tool or splitting the number into smaller chunks.

Why does each hexadecimal digit represent exactly 4 binary bits?

Because 16 = 2⁴, each hex digit (0–F) maps to exactly four binary bits (0000–1111). This makes hex a compact shorthand for binary — for example, 0xFF = 11111111 in binary. Similarly, each octal digit maps to 3 binary bits because 8 = 2³.