Decimal and binary converter

Decimal to Binary Converter: Base-10 to Base-2

Convert decimal numbers (Base-10) into binary code (Base-2) instantly with this accurate decimal to binary converter. It features built-in support for seamless binary-to-decimal conversion whenever you need it. Also known as a decimal to binary translator, it doubles as a quick reference for common base-2 values.

decimal-to-binary
BigInt precision
Decimal Number (Base-10) Auto Convert Binary Code (Base-2)
Input
Switch direction
Output
Characters 0
Bytes 0
Bits 0
Ready

Need to decode binary data back into readable text?

Switch to our main Binary Translator for instant binary-to-text conversion.

What Is Decimal to Binary Conversion?

Decimal-to-binary conversion transforms Base-10 numbers into Base-2 binary values used by computers and digital systems. It is commonly used in programming, networking, electronics, and low-level computing tasks.

Where Decimal to Binary Conversion Is Used

Decimal-to-binary conversion is commonly used in programming, networking, computer science education, electronics, and low-level system operations. Developers often work with binary values when handling memory addresses, bitwise operations, and low-level system data.

How to Convert Decimal to Binary

Two methods cover almost every case. Repeated division works for any size of number; positional weights are faster once the place values are memorised. Both produce the same bits, so use whichever you find easier to check.

Method 1 — Divide by 2 and Record Remainders

  1. Divide the number by 2 and write down the quotient and the remainder, which is always 0 or 1.
  2. Repeat with the quotient until it reaches 0.
  3. Read the remainders from bottom to top — that order is the binary number.
  4. Check the result by adding the place values back up.

Here is how to convert decimal to binary with 25:

25 ÷ 2 = 12 remainder 1
12 ÷ 2 = 6 remainder 0
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1

Reading upward gives 11001. The last remainder is always the leftmost bit, which is why the direction matters, and the quotient shrinks every round, so even large numbers finish in a few steps. Division by 2 is the positional rule in disguise: each round peels off the least significant bit and shifts the rest one place to the right.

Method 2 — Positional Weights

Each bit position carries a power of two. Write the weights from right to left, then take the largest one that still fits. A weight that fits gets a 1 and is subtracted; a weight that does not fit gets a 0.

128   64   32   16   8   4   2   1

For 100, the largest weight that fits is 64, leaving 36. Then 32, leaving 4. Then 4, leaving 0. Mark those positions with 1 and every other position with 0 to get 1100100.

Once the weights are familiar, you can convert decimal to binary by subtraction alone.

Three Worked Examples

Both methods give the same decimal to binary result, so use the one you trust more. You can also convert decimal to binary for any value with the same three steps shown below.

13 → largest weight 8, remainder 5

→ largest weight 4, remainder 1

→ weight 1, remainder 0 → 1101

156 → largest weight 128, remainder 28

→ 16, remainder 12; then 8, remainder 4

→ 4, remainder 0 → 10011100

200 → largest weight 128, remainder 72

→ 64, remainder 8

→ 8, remainder 0 → 11001000

Notice that each example marks only the weights it uses; every skipped weight becomes a zero in the final string.

Example: Convert Decimal to Binary

25 → 11001

25 ÷ 2 = 12 remainder 1
12 ÷ 2 = 6 remainder 0
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1

Binary result: 11001

The same steps are laid out as a numbered routine in Method 1 above; this box is the raw division trail.

Decimal to Binary Chart

Use this chart to check a result without repeating the division. The left column is the familiar base-10 value, and the right column is the same quantity written with only 0s and 1s.

Read across each row rather than down a column: the two cells in a row belong together.

DecimalBinary
00
11
210
311
4100
5101
6110
7111
81000
91001
101010
111011
121100
131101
141110
151111
1610000

Every entry from 0 to 15 fits in four bits, and 16 is the first value that needs a fifth. That boundary is why programmers talk in nibbles and bytes.

The second table picks out the values that come up most often in code, networking, and hardware work.

DecimalBinary
1610000
2010100
2411000
32100000
48110000
50110010
641000000
961100000
1001100100
1271111111
12810000000
15010010110
20011001000
24011110000
25011111010
25511111111

Each row in the second table is a round number in binary terms: a power of two, or one less than a power of two.

If a value is missing, convert it with the tool at the top of the page — the table is a shortcut, not a replacement.

Common Decimal to Binary Conversions

These are the values people look up most often. Each one is short enough to memorise, and each has a hook that makes it stick.

100 in Binary

100 = 1100100. It needs seven bits, and in ASCII it is the lowercase letter d — a useful anchor if you work with text encoding. The leading 1 sits on the 64 weight, so 100 is the first value that uses seven bits.

255 in Binary

255 = 11111111. That is one byte with every bit set, the largest value an 8-bit field can hold. It is also why colour channels run from 0 to 255. In hexadecimal the same pattern is written FF.

256 in Binary

256 = 100000000. That is 28, one more than a full byte, so it needs nine bits. It is the first value that will not fit in eight. An 8-bit counter that adds one at 255 wraps back to 0 here, which is a common source of off-by-one bugs.

1000 in Binary

1000 = 1111101000. Ten bits, and no simple power-of-two pattern. It is a good test of whether you are reading the weights correctly, because the round number in decimal looks irregular in base 2.

1024 in Binary

1024 = 10000000000. That is 210, the reason a kilobyte is 1024 bytes. One bit set, ten zeros after it. Storage sizes build on this unit: 1024 bytes make a kilobyte, and 1024 kilobytes make a megabyte.

Decimal to Binary Formula

For a number N, the binary form is the set of bits that satisfy this expansion:

N = bk·2k + … + b2·4 + b1·2 + b0·1

Dividing N by 2 repeatedly extracts b0 first, then b1, and so on, so the remainders read in reverse are the digits. Expanding the weights in the other direction recovers the decimal value, which is the check described on the binary to decimal page.

Base-10 vs Base-2

Base-10, or decimal, uses ten digits and places values at powers of ten: 1, 10, 100, 1000. It is the system of everyday counting, so 42 means four tens and two ones.

Base-2 uses two digits and places values at powers of two: 1, 2, 4, 8, 16. The same quantity takes more positions, because each position carries less weight.

A base 2 translator works the same way in reverse: it reads the bit positions, adds the weights that are set to 1, and returns the decimal total. The term binary number simply means a value written in that two-digit system.

Why Use This Decimal to Binary Converter?

Designed for speed and accuracy, the converter supports large integers and real-time conversion directly in the browser. It is useful for programming, networking, computer science education, and everyday number conversion tasks.

Supported Features

  • Decimal ↔ Binary conversion
  • Large integer support (BigInt)
  • Real-time conversion
  • Copy-to-clipboard support
  • Instant direction switching

FAQ

What is a decimal to binary converter?

A decimal-to-binary converter is a tool that transforms Base-10 numbers into Base-2 binary code instantly for programming, networking, and computer system tasks.

What is decimal to binary conversion?

Decimal-to-binary conversion changes Base-10 numbers into Base-2 binary values used by computers and digital systems.

How do you convert decimal to binary?

Decimal numbers are converted into binary by repeatedly dividing the number by 2 and reading the remainders from bottom to top.

What is binary code?

Binary code is a numbering system that uses only 0s and 1s to represent digital data and computer instructions.

Can I convert binary back to decimal?

Yes. The converter supports both decimal-to-binary and binary-to-decimal conversion instantly.

Why do computers use binary numbers?

Computers use binary because digital circuits can reliably process two electrical states: on and off, represented as 1 and 0.

Can this converter handle large numbers?

Yes. The tool supports large integer conversion using BigInt precision for accurate results.

What is the difference between Base-10 and Base-2?

Base-10 uses digits from 0 to 9 and is used in everyday math. Base-2 uses only 0 and 1 and is the standard numbering system for computers.

What is a decimal to binary translator?

A decimal to binary translator is a tool that takes a base-10 number and returns its base-2 equivalent, usually as you type. This page pairs one with a chart and worked methods, so you can convert a value and check the result in the same place.

How do you convert a negative decimal to binary?

Most systems use a fixed width and a sign bit. Write the positive value in that width, invert every bit, then add 1 — that is two's complement. For example, −5 in eight bits is 11111011. The converter above handles non-negative whole numbers.

How many bits does a number need?

Count the digits in the binary result, or take the base-2 logarithm and round up. Values 0–1 need one bit, 2–3 need two, 4–7 need three, and each power of two adds one more. 255 needs eight bits; 256 needs nine.

Related Converters

Every converter on this site uses the same layout, so you can move between them without relearning the interface.

Further Reading

Background guides on where binary comes from and how to read it by hand.

Jump to a Section

Ready to Convert Decimal Numbers Instantly?

Use the converter above to translate decimal values into binary code in real time. No setup, downloads, or registration required.

Convert Decimal Now

Blog

Learn Binary Translation