How to convert decimal to binary
The standard method is repeated division by 2. At each step, divide the number by 2 and record the remainder. When the quotient reaches 0, read the remainders from bottom to top — that's your binary number.
Reading remainders bottom-up for 181: 10110101.
Why division by 2?
Binary is base-2. In any positional number system, you extract digits of the target base by repeatedly dividing by that base and collecting remainders. Dividing by 2 extracts binary digits; dividing by 16 would extract hex digits.
Each remainder is either 0 or 1 (since you're dividing by 2), matching the only two digits in binary.
Quick reference
| Decimal | Binary | Hex |
|---|---|---|
| 1 | 1 | 0x1 |
| 8 | 1000 | 0x8 |
| 16 | 10000 | 0x10 |
| 64 | 1000000 | 0x40 |
| 100 | 1100100 | 0x64 |
| 255 | 11111111 | 0xFF |
| 1,024 | 10000000000 | 0x400 |
| 65,535 | 1111111111111111 | 0xFFFF |
FAQ
What's the largest decimal I can convert?
Uses BigInt internally, so any positive integer you can type.
How do I convert negative numbers?
For negatives, you need two's complement representation, which requires a fixed bit-width. This converter handles positive integers only.
What about fractional decimals (e.g. 0.75)?
For the fractional part, multiply by 2 repeatedly and collect the integer parts. This converter handles whole integers only. For 0.75: 0.75×2=1.5 → 1, 0.5×2=1.0 → 1. Result: 0.11 in binary.