InovoTools
Developer Tools

Decimal to Binary Converter

Convert a decimal number to binary, with the hex and octal equivalents shown alongside. The binary result is grouped in fours so long bit strings are easy to read and copy.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use the Decimal to Binary Converter

Type a whole number in decimal. You get the binary value in groups of four bits, plus hex and octal.

How decimal to binary conversion works

Divide the number by 2 and write down the remainder, then keep dividing the quotient by 2 until it reaches 0. Read the remainders from last to first. For 45: 45 → 22 r1, 22 → 11 r0, 11 → 5 r1, 5 → 2 r1, 2 → 1 r0, 1 → 0 r1, so 45 is 101101.

A faster method with powers of two

Find the largest power of two that fits (32 for 45), subtract it and repeat with what is left: 13 uses 8, the remaining 5 uses 4 and the last 1 uses 1. Put a 1 under each power you used and a 0 under the others. Reading 32, 16, 8, 4, 2, 1 gives 1 0 1 1 0 1.

How it works

Divide repeatedly by 2 and read the remainders upward.

Examples

  • 45
    Binary: 10 1101
    Hex: 2D
    Octal: 55
  • 255
    Binary: 1111 1111
    Hex: FF
    Octal: 377
  • 1024
    Binary: 100 0000 0000
    Hex: 400
    Octal: 2000

Decimal to binary table

DecimalBinary
00
11
210
311
4100
5101
6110
7111
81000
91001
101010
111011
121100
131101
141110
151111
161 0000
3210 0000
64100 0000
100110 0100
1281000 0000
2551111 1111

Limitations and assumptions

Runs entirely in your browser. Nothing you enter is uploaded.

Frequently asked questions

What is 255 in binary?

1111 1111. It is the largest number that fits in one byte of eight bits.

What is 10 in binary?

1010. Ten is 8 + 2, so the bits for 8 and 2 are set.

How many bits do I need for a number?

A number below 2ⁿ fits in n bits. Values up to 255 need 8 bits, up to 65,535 need 16 bits and up to 4,294,967,295 need 32 bits.

How do I convert binary back to decimal?

Use the binary to decimal converter, which adds up the place values of the 1 bits.