Skip to content
ForceConversion

Popular tools

Decimal to Binary Converter

Convert decimal numbers to binary. Writing a decimal number in binary shows which bits are set, which is needed for bit masks, subnet masks and low-level programming.

Decimal to Binary converter

Whole numbers. Spaces, underscores and the prefixes 0b, 0o and 0x are accepted.

Result

Binary
—
Octal
—
Decimal
—
Hexadecimal
—

How to convert decimal to binary

Divide the number by 2, write down the remainder, and repeat with the quotient until it reaches 0. Read the remainders from last to first to get the binary digits.

Example: 156 (decimal) to binary

Dividing 156 by 2
DivisionQuotientRemainder
156 ÷ 2780
78 ÷ 2390
39 ÷ 2191
19 ÷ 291
9 ÷ 241
4 ÷ 220
2 ÷ 210
1 ÷ 201

Remainders from last to first: 10011100. So 156 = 10011100 in binary.

Examples

  • 10 (decimal) = 1010 (binary)
  • 156 (decimal) = 10011100 (binary)
  • 255 (decimal) = 11111111 (binary)
  • 1000 (decimal) = 1111101000 (binary)

Decimal to Binary conversion table

Decimal to Binary
Decimal (base 10)Binary (base 2)
00
11
210
311
4100
5101
6110
7111
81000
91001
101010
111011
121100
131101
141110
151111
1610000
2010100
32100000
50110010
641000000
1001100100
1271111111
12810000000
25511111111
256100000000
5121000000000
10001111101000
102410000000000

The table lists the same whole numbers for every pair of bases.

Frequently asked questions

What is 255 in binary?
255 in decimal is 11111111 in binary.
How do I convert decimal to binary by hand?
Divide the number by 2, write down the remainder, and repeat with the quotient until it reaches 0. Read the remainders from last to first to get the binary digits.
What digits does decimal use?
Decimal uses the digits 0 to 9. Decimal is the everyday number system for counting, money and measurement.
What is binary used for?
Computers store and process everything as binary digits (bits). Eight bits make one byte.