Skip to content
Binary Translator
Menu

Decimal to Binary Converter

Enter any whole number to get it in binary, with every division step shown. Negative numbers are converted to two's complement.

Updated · UTF-8 text encoding

A whole number. Commas are fine. Negative numbers use two's complement.

Binary

1001 1100

8 bits

DivideQuotientRemainder
156 ÷ 2780
78 ÷ 2390
39 ÷ 2191
19 ÷ 291
9 ÷ 241
4 ÷ 220
2 ÷ 210
1 ÷ 201

Read the remainders from bottom to top: 10011100.

How to convert decimal to binary: the division method

Take 37 as an example:

DivideQuotientRemainder
37 ÷ 2181
18 ÷ 290
9 ÷ 241
4 ÷ 220
2 ÷ 210
1 ÷ 201

Reading the remainders from the bottom up gives 100101. Check it: 32 + 4 + 1 = 37. The first remainder is always the rightmost digit, which is why you read upward.

The subtraction method

If you know the powers of 2 (1, 2, 4, 8, 16, 32, 64, 128...), you can work from the left instead. Find the largest power that fits, write a 1, subtract it, and move to the next power down, writing 1 if it fits and 0 if it doesn't. For 37: 32 fits (1, leaves 5), 16 no (0), 8 no (0), 4 fits (1, leaves 1), 2 no (0), 1 fits (1). Same answer, 100101.

Negative numbers

Binary itself has no minus sign, so computers use two's complement within a fixed number of bits. In 8 bits you can store -128 to 127; in 16 bits, -32,768 to 32,767. The converter asks for the width so it can tell you when a number won't fit. To check a result, paste it into the binary to decimal converter and switch to signed.

Want the binary for text rather than a number? That's a different conversion; use the text to binary converter.

Questions people ask

How do you convert decimal to binary?

Divide by 2 repeatedly and note each remainder, then read them bottom to top. 13 → 1, 0, 1, 1 → 1101.

What is 100 in binary?

1100100 (64 + 32 + 4).

How do you write a negative number in binary?

Write the positive number, flip every bit, add 1. -5 in 8 bits: 00000101 → 11111010 → 11111011.

Sources

More binary converters