Skip to content

31 in Binary

Decimal 31 equals 11111 in binary.

31 in all number bases

Decimal31
Hexadecimal0x1F
Binary0001 1111
Octal37

Try another value

Edit this value or switch its base. Your changes are calculated in your browser with exact integer arithmetic.

Input base:
Decimal31
Hex0x1F
Binary0b11111
Octal0o37

How 31 converts from decimal to binary

Divide by 2 repeatedly and keep each remainder, then read the remainders from bottom to top:

31÷ 2 =15remainder1
15÷ 2 =7remainder1
7÷ 2 =3remainder1
3÷ 2 =1remainder1
1÷ 2 =0remainder1

Result (remainders bottom to top): 11111

This tool runs entirely in your browser - nothing you enter is uploaded or stored.

Want to learn the method behind this tool? Read How to Convert Decimal to Binary - the full step-by-step guide.