radixflip

What is 21 in binary?

21₁₀ converted to binary is 10101₂. The complete working for this exact number is below — or type a different number into the decimal to binary converter and watch it happen live.

21₁₀ = 10101₂

Try it yourself — instant converter

Only 0–9. Type here — the answer appears instantly, no button to press.
Type a number in any box above.

How to convert 21 to binary, step by step

Keep dividing 21 by 2 and writing down each remainder. The remainders, read in reverse, are the answer.

Number÷ 2QuotientRemainder
212101
10250
5221
2210
1201

Reading the remainder column from the bottom up gives 10101, so 21₁₀ = 10101₂. Check it back: 16 + 4 + 1 = 21 — the 1 bits add up to 21.

In short: 21 ÷ 2 = 10 r 1 → 10 ÷ 2 = 5 r 0 → 5 ÷ 2 = 2 r 1 → 2 ÷ 2 = 1 r 0 → 1 ÷ 2 = 0 r 1 → read bottom-up: 10101₂

Frequently asked questions

How do you write 21 in binary?

Divide 21 by 2 over and over, noting each remainder: 21 ÷ 2 = 10 r1, 10 ÷ 2 = 5 r0, 5 ÷ 2 = 2 r1, 2 ÷ 2 = 1 r0, 1 ÷ 2 = 0 r1. Reading the remainders from last to first gives 10101, so 21₁₀ = 10101₂.

How long is 21 in binary?

21 in binary is 10101, which is 5 bits long. It ends in 1 because 21 is odd — the last bit of any binary number tells you odd (1) or even (0).

Keep converting

Popular values