21 in binary is 10101. The decimal number 21 converts to binary 10101₂ using repeated division by 2. In 8-bit form: 00010101. The page shows the full step-by-step division table, an 8-bit visualiser with place values, and conversions to octal (25) and hexadecimal (15)....
21 IN BINARY (BASE 2)
10101
21₁₀ = 10101₂
Binary (base 2)
10101
8-bit binary
00010101
Octal (base 8)
25
Hex (base 16)
15
Bit length
5 bits
Active bits (1s)
3 of 5
Even or odd?
Odd (ends in 1)
Power of 2?
No
STEP-BY-STEP — REPEATED DIVISION BY 2
| Dividend | ÷ 2 | Quotient | Remainder ↑ |
|---|---|---|---|
| 21 | ÷ 2 | 10 | 1 |
| 10 | ÷ 2 | 5 | 0 |
| 5 | ÷ 2 | 2 | 1 |
| 2 | ÷ 2 | 1 | 0 |
| 1 | ÷ 2 | 0 | 1 |
Read remainders from bottom to top: 10101 = 10101
FUN FACT
21 in binary is 10101 — an alternating pattern, like 5 (101) extended. 21 = 16 + 4 + 1 = 2^4 + 2^2 + 2^0.
8-BIT REPRESENTATION
2⁷
128
2⁶
64
2⁵
32
2⁴
16
2³
8
2²
4
2¹
2
2⁰
1
3 active bits — 2⁴ + 2² + 2² = 21
PLACE VALUE BREAKDOWN
| 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
|---|---|---|---|---|
| 16 | 8 | 4 | 2 | 1 |
| 1 | 0 | 1 | 0 | 1 |
16 + 4 + 1 = 21 ✓
BASE CONVERSIONS
Decimal (base 10)
Standard counting system
21
Binary (base 2)
Used in all digital computing
10101
Octal (base 8)
Used in Unix permissions
25
Hexadecimal (16)
Used in colours, memory addresses
15
NEARBY VALUES
DECIMAL 0–30 IN BINARY
Write down the decimal number 21. To convert to binary, repeatedly divide by 2 and record the remainder at each step.
21 ÷ 2 = 10 remainder 1 10 ÷ 2 = 5 remainder 0 5 ÷ 2 = 2 remainder 1 2 ÷ 2 = 1 remainder 0 1 ÷ 2 = 0 remainder 1 Read remainders bottom to top: 10101
Read the remainders from bottom to top: 10101. This is the binary representation of 21.
Verify by converting back: 1 + 4 + 16 = 21. ✓
21 to binary: 21 ÷ 2 = 10 remainder 1 10 ÷ 2 = 5 remainder 0 5 ÷ 2 = 2 remainder 1 2 ÷ 2 = 1 remainder 0 1 ÷ 2 = 0 remainder 1 Read remainders bottom to top: 10101 21₁₀ = 10101₂ 8-bit: 00010101 Octal: 25 Hex: 15
Hexadecimal Converter
Calculate instantly →
2 in Binary
Calculate instantly →
4 in Binary
Calculate instantly →
Random Number Generator
Calculate instantly →
8 in Binary
Calculate instantly →
16 in Binary
Calculate instantly →
10 in Binary
Calculate instantly →
1 in Binary
Calculate instantly →
255 in Binary
Calculate instantly →
3 in Binary
Calculate instantly →
6 in Binary
Calculate instantly →
9 in Binary
Calculate instantly →
11 in Binary
Calculate instantly →
14 in Binary
Calculate instantly →
128 in Binary
Calculate instantly →
0 in Binary
Calculate instantly →
5 in Binary
Calculate instantly →
7 in Binary
Calculate instantly →
12 in Binary
Calculate instantly →
Binary Converter
Calculate instantly →
Last updated: April 29, 2026 · Verified by EagleCalculator team · Eagle-eyed accuracy for every calculation.