21 in binary
21 in binary is 10101. In hexadecimal it is 15 and in octal 25.
21 in binary
Pick any whole number from 1 to 10,000.
How to work it out
- 1
Divide 21 by 2 again and again, writing down the remainder each time, until you reach 0.
- 2
Read the remainders from the bottom up: 10101.
- 3
Check by adding powers of 2: 16 + 4 + 1 = 21.
LaTeX source of the formulas on this page
\[ 21_{10} = 10101_{2} \]Dividing 21 by 2
| Number | Division | Remainder |
|---|---|---|
| 21 | 21 ÷ 2 = 10 | 1 |
| 10 | 10 ÷ 2 = 5 | 0 |
| 5 | 5 ÷ 2 = 2 | 1 |
| 2 | 2 ÷ 2 = 1 | 0 |
| 1 | 1 ÷ 2 = 0 | 1 |
Questions
What is 21 in binary?
10101.
What is 21 in hexadecimal?
15.
What is 21 in octal?
25.
How many bits does 21 need?
5 bits.