devkult_
tools24converters26
home/convert/decimal-to-binary

Convert Decimal to Binary

Binary is how computers actually store integers, and seeing the bits helps with masks, flags, and low-level debugging. This converter turns base-10 numbers into their base-2 representation.

Example · DecimalBinary
Decimal input
2
10
42
255
Binary output
10
1010
101010
11111111

How to convert Decimal to Binary

  1. Take your base-10 integer.
  2. Repeatedly divide by 2, recording each remainder (0 or 1).
  3. Read the remainders bottom-up — 10 becomes 1010.

Frequently asked questions

What is 255 in binary?

255 is 11111111 — eight ones, which is exactly one byte with every bit set.

How do I read the result?

Each position is a power of two, doubling from right to left (1, 2, 4, 8, …). Add the positions that hold a 1 to recover the decimal value.

Related converters