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.

DivisionQuotientRemainder
18 ÷ 290
9 ÷ 241
4 ÷ 220
2 ÷ 210
1 ÷ 201

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.

BitPlace valueContributes
124 = 1616
023 = 80
022 = 40
121 = 22
020 = 10

Adding the contributions: 16 + 0 + 0 + 2 + 0 = 18. The conversion checks out.

18 in every base

FormatValue
Binary10010
Decimal18
Hexadecimal12
Octal22
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.