radixflip

What is 31 in binary?

31₁₀ converted to binary is 11111₂. 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.

31₁₀ = 11111₂

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 31 to binary, step by step

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

Number÷ 2QuotientRemainder
312151
15271
7231
3211
1201

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

In short: 31 ÷ 2 = 15 r 1 → 15 ÷ 2 = 7 r 1 → 7 ÷ 2 = 3 r 1 → 3 ÷ 2 = 1 r 1 → 1 ÷ 2 = 0 r 1 → read bottom-up: 11111₂

Frequently asked questions

How do you write 31 in binary?

Divide 31 by 2 over and over, noting each remainder: 31 ÷ 2 = 15 r1, 15 ÷ 2 = 7 r1, 7 ÷ 2 = 3 r1, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1. Reading the remainders from last to first gives 11111, so 31₁₀ = 11111₂.

What is special about 31 in binary?

31 in binary is 11111 — all 1s. A run of 5 ones always adds up to 2^5 − 1 = 31, the largest value that fits in 5 bits.

Keep converting

Popular values