Decimal to Binary Converter

developer · number system

Convert Decimal to Binary with a fixed input and output format, step-by-step formulas under the result, and reference tables. Parsing matches the main hub (0b, 0x, leading 0 for octal; one optional . for fractional digits on numeric bases; single character for character mode).

Calculator

From: Decimal

To: Binary

Formulas

Enter a value → place-value expansion + division chain.

About Decimal

Decimal (base 10) uses digits 0–9; no prefix is required. A single . may separate the fractional part (10⁻¹, 10⁻², …). Values are parsed to a number and re-encoded into the target format; very long fractions are limited by floating-point precision.

About Binary

Binary (base 2) uses digits 0 and 1. This tool accepts an optional 0b prefix. You may use one radix point; digits after it use negative powers of two (½, ¼, …). It is the native representation for digital logic and bitwise operations.

How to convert decimal to binary

Three steps: symbols → the right math move for this pair → worked examples you can copy on paper. Numeric bases (binary, octal, decimal, hex) also support one radix point and digits after it; character mode stays a single code unit.

Step 1 — Identify the symbols

Input (Decimal): Ordinary digits 0–9; each position is a power of ten.

Output (Binary): Each position is either 0 or 1.

Dev note
  • Many tools allow a 0b prefix (e.g. 0b1010).

Step 2 — Repeated Division by 2

Repeated division by 2: divide the decimal number by 2, write each remainder, replace the number with the whole quotient, repeat until the quotient is 0. Read the remainders from last division to first to read the binary digits.

Fractional decimal values: convert the whole part with repeated division, then multiply the fractional part by the target base over and over; each integer you get is the next digit after the radix point (same idea the calculator shows in Formulas).

Step 3 — Worked examples

Two practice values in Decimal, converted to Binary using the same rules as Step 2. Example 3 uses a fractional part (digits after the radix point); the hub and pair calculators accept a single . on binary, octal, decimal, and hex inputs.

Example 1

"26" (Decimal) → Binary.

From decimal

N₁₀ = 26

Whole part — repeated division:
26 ÷ 2 = 13  R 0
13 ÷ 2 = 6  R 1
6 ÷ 2 = 3  R 0
3 ÷ 2 = 1  R 1
1 ÷ 2 = 0  R 1

Read remainders bottom → top → 11010

→ tool: 0b11010

Verify: "26"0b11010

Example 2

"100" (Decimal) → Binary.

From decimal

N₁₀ = 100

Whole part — repeated division:
100 ÷ 2 = 50  R 0
50 ÷ 2 = 25  R 0
25 ÷ 2 = 12  R 1
12 ÷ 2 = 6  R 0
6 ÷ 2 = 3  R 0
3 ÷ 2 = 1  R 1
1 ÷ 2 = 0  R 1

Read remainders bottom → top → 1100100

→ tool: 0b1100100

Verify: "100"0b1100100

Example 3

"10.625" (Decimal) → Binary.

From decimal

N₁₀ = 10.625

Whole part — repeated division:
10 ÷ 2 = 5  R 0
5 ÷ 2 = 2  R 1
2 ÷ 2 = 1  R 0
1 ÷ 2 = 0  R 1

Read remainders bottom → top → 1010

Fractional part — multiply by 2, integer of each product = next digit after .
  0.625×2 = 1.25  →  1
  0.25×2 = 0.5  →  0
  0.5×2 = 1  →  1
Digits after . (in order): .101

→ tool: 0b1010.101

Verify: "10.625"0b1010.101

Summary

To convert Decimal to Binary, the tool first parses your input strictly as decimal, producing a decimal value. For binary, octal, decimal, and hex, you may include one radix point and fractional digits; character input remains a single code unit with no dot. That value is formatted as binary using the same rules as the main Number System Converter (prefixes 0b, 0, 0x where applicable; character output uses symbolic names for common controls and requires a whole-number code point). Long fractional expansions are truncated to a fixed digit cap; ordinary floating-point rounding may appear in extreme cases.

Relationship context

Decimal, Binary, and the other numeric bases on this site all describe the same numeric value; only the radix changes (including optional fractional digits after one dot). Moving between them is equivalent to changing how the value is written, not to scaling or unit conversion. Binary, octal, and hex align with bit boundaries (powers of two), while decimal is optimized for human arithmetic.

Conversion tables

Decimal (input)Binary (output)
00
10b1
20b10
30b11
40b100
50b101
60b110
70b111
80b1000
90b1001
100b1010
150b1111
160b10000
Decimal (input)Binary (output)
110b1011
320b100000
640b1000000
1280b10000000
2560b100000000
5120b1000000000
10240b10000000000
20480b100000000000
40960b1000000000000
81920b10000000000000
163840b100000000000000
327680b1000000000000000
655350b1111111111111111

More number system pairs

Other fixed input/output converters use the same parsing rules as the hub. Open any pair for the same calculator layout and reference tables.