Decimal to Binary Converter

Type a decimal number to see it in binary and the other common bases, with the working shown step by step.

Binary
1011
Octal
13
Decimal
11
Hexadecimal
B
Other base (36)
B

Bits: 4

Working
positional expansion / repeated division / bit grouping
  1. 11 ÷ 2 = 5 … 1
  2. 5 ÷ 2 = 2 … 1
  3. 2 ÷ 2 = 1 … 0
  4. 1 ÷ 2 = 0 … 1
  5. 11₍10₎ = 1011₍2₎

How to convert

  1. Repeated division: divide the decimal number by 2, note each remainder until the quotient is 0, then read the remainders bottom-up.
  2. Example: 11 ÷ 2 = 5 r 1, 5 ÷ 2 = 2 r 1, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1 → 1011.

Notes

  • Integers of any length are converted exactly — no scientific notation.
  • Prefixes are accepted: 0x for hex, 0b for binary, 0o for octal; spaces and underscores are ignored.
  • Negative numbers: prefix with "-". Fractions are not supported yet.

Decimal to Binary table

DecimalBinaryHex
000
111
2102
3113
41004
51015
61106
71117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F
161 000010
3210 000020
64100 000040
100110 010064
127111 11117F
1281000 000080
2551111 1111FF
2561 0000 0000100
100011 1110 10003E8
1024100 0000 0000400
40961 0000 0000 00001000
655351111 1111 1111 1111FFFF

Frequently Asked Questions

Related