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 · Decimal → Binary
Decimal input
2 10 42 255
Binary output
10 1010 101010 11111111
How to convert Decimal to Binary
- Take your base-10 integer.
- Repeatedly divide by 2, recording each remainder (0 or 1).
- 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