Skip to content
ConvertCalculate

Decimal to Binary

Easily convert decimal numbers to binary format to represent data in computer systems, digital circuits, or programming applications with precision and reliability.

  • Free
  • Instant results
  • Runs in your browser
In short

To convert decimal to binary, divide the number by 2 repeatedly and read the remainders from bottom to top. For example, decimal 45 is 101101 in binary.

How it works

Decimal counts in base 10, binary counts in base 2. Converting means rewriting the same quantity with a different set of digits — the value never changes, only how it is written.

  1. Divide the decimal number by 2.
  2. Write down the remainder — that is the last digit of the binary number.
  3. Repeat with the quotient until it reaches zero, then read the remainders bottom to top.

The reverse conversion is Binary to Decimal, which also handles every other base pair.

Examples

Worked examples, digit by digit:

  • 10 (decimal) = 10 in decimal = 1010 (binary)
  • 21 (decimal) = 21 in decimal = 10101 (binary)
  • 255 (decimal) = 255 in decimal = 11111111 (binary)
Common values in every base
DecimalBinaryOctalHexadecimal
0000
1111
21022
410044
81000108
10101012A
15111117F
16100002010
321000004020
64100000010040
100110010014464
25511111111377FF

Decimal to Binary: frequently asked questions

How do I convert decimal to binary?
Divide the number by 2 repeatedly and read the remainders from bottom to top. For example, decimal 45 is 101101 in binary. The converter above does this instantly for any value.
What is 255 in binary?
Decimal 255 equals 11111111 in binary (the value 255, the largest number that fits in one byte).
Why are decimal and binary used?
Decimal (base 10) is the everyday number system. Binary (base 2) is how computers store data, as bits that are either 0 or 1.