18 in Binary
18 in binary is 10010. It takes 5 bits to write, and as a full byte it is 00010010.
How to convert 18 to binary
Divide by 2, write down the remainder, and repeat with the quotient until it reaches 0. The remainders, read from the last row up to the first, spell out 10010.
| Division | Quotient | Remainder |
|---|---|---|
| 18 ÷ 2 | 9 | 0 |
| 9 ÷ 2 | 4 | 1 |
| 4 ÷ 2 | 2 | 0 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Check it the other way
To verify, read 10010 left to right, giving each digit its place value and adding up the places that hold a 1.
| Bit | Place value | Contributes |
|---|---|---|
| 1 | 24 = 16 | 16 |
| 0 | 23 = 8 | 0 |
| 0 | 22 = 4 | 0 |
| 1 | 21 = 2 | 2 |
| 0 | 20 = 1 | 0 |
Adding the contributions: 16 + 0 + 0 + 2 + 0 = 18. The conversion checks out.
18 in every base
| Format | Value |
|---|---|
| Binary | 10010 |
| Decimal | 18 |
| Hexadecimal | 12 |
| Octal | 22 |
| As a byte (8-bit) | 00010010 |
Worth knowing about 18
Eighteen is the only number that equals exactly twice the sum of its own digits: 1 plus 8 is 9, and 9 doubled lands back on 18.
Convert another number
- Binary
- Hex
- Octal
Nearby numbers
Or browse the full table at numbers in binary.
FAQ
What is 18 in binary?
18 in binary is 10010. Each digit's place is worth double the one to its right, starting from 1. Add up the places holding a 1 and you get 18 back. As a full 8-bit byte it is written 00010010, the same value padded with leading zeros.
How many bits does 18 need?
18 needs 5 bits in binary: 10010. A number needs one more bit each time it crosses a power of two, which is why the counts climb slowly. Stored in a computer it usually occupies a full 8-bit byte anyway, written 00010010 with zeros filling the front.
What is 18 in hex?
18 in hexadecimal is 12. Hex is base 16, so every hex digit stands for exactly four binary digits, which makes it a compact way to write the same value. In octal, base 8, 18 becomes 22. All three are just different spellings of the number 18.