Decimal to Binary Converter
Enter a decimal number to see it in binary, with the divide-by-2 steps.
Result 10011100.
Binary (base 2)1001 1100
Step by step
- Divide by 2 repeatedly and write down the remainders:
Division Quotient Remainder 156 ÷ 2 78 0 78 ÷ 2 39 0 39 ÷ 2 19 1 19 ÷ 2 9 1 9 ÷ 2 4 1 4 ÷ 2 2 0 2 ÷ 2 1 0 1 ÷ 2 0 1 - Read the remainders from bottom to top: 1001 1100
| binary (base 2) | 1001 1100 |
|---|---|
| octal (base 8) | 234 |
| decimal (base 10) | 156 |
| hexadecimal (base 16) | 9C |
| Bits needed | 8 bits (fits in 1 byte) |
| 8-bit form | 1001 1100 |
| 16-bit form | 0000 0000 1001 1100 |
| 32-bit form | 0000 0000 0000 0000 0000 0000 1001 1100 |
How to convert decimal to binary
- Divide the number by 2 and write down the remainder (0 or 1).
- Divide the quotient by 2 again; repeat until the quotient is 0.
- Read the remainders from the last one to the first.
156 → 78 r0, 39 r0, 19 r1, 9 r1, 4 r1, 2 r0, 1 r0, 0 r1 → 10011100.
Negative numbers in computers use two’s complement.
Popular numbers in binary
Frequently asked questions
What is 156 in binary?
10011100.
What is 10 in binary?
1010.
How do I write a negative number in binary?
Usually with two's complement: invert the bits of the positive number and add 1.