Decimal to Binary Converter

Convert decimal numbers to binary, grouped in 4-bit nibbles

Decimal
–
Binary
–
Hexadecimal
–
Octal
–
–

How to convert decimal to binary

  1. Type a whole number in decimal.
  2. The binary form appears, split into groups of four bits so it is easy to read, with the number of bits and bytes needed.

The division method

Divide the number by 2 and write down the remainder (0 or 1). Keep dividing the quotient by 2 until it reaches 0. The binary number is the remainders read from bottom to top. For 156: 156 ÷ 2 = 78 r0, 78 ÷ 2 = 39 r0, 39 ÷ 2 = 19 r1, 19 ÷ 2 = 9 r1, 9 ÷ 2 = 4 r1, 4 ÷ 2 = 2 r0, 2 ÷ 2 = 1 r0, 1 ÷ 2 = 0 r1. Reading upwards gives 10011100.

Alternatively, subtract the largest power of two that fits (128), then the next (16), and so on, writing 1 for each power used: 156 = 128 + 16 + 8 + 4 → 1001 1100.

DecimalBinary
11
210
5101
101010
161 0000
4210 1010
100110 0100
127111 1111
2551111 1111
100011 1110 1000

Each group of four bits is one hexadecimal digit, which is why 1001 1100 is 9C in hex. Large numbers are handled exactly.

FAQ

What is 10 in binary?

1010.

How many bits do I need for a number?

The tool shows it under the binary result. In general, n bits hold values up to 2ⁿ − 1.

How do I write a negative number in binary?

Mathematically with a minus sign. Computers use two’s complement: invert the bits of the positive value and add 1, at a fixed width such as 8 or 32 bits.

Made by BufferMint. We also design and build software products for founders. See our services →

Your files and inputs never leave your device; we only count anonymous visits.