Mathematical Tutorial

How to Convert Decimal to Binary

A detailed breakdown of decimal to binary algorithms: the successive division method and the subtraction of powers method.

Try it: Decimal to Binary mini-calculator

Binary Result: 11001

Method 1: Successive division by 2.

The most common method for converting decimal numbers into binary is successive division by 2. In this algorithm, you divide the decimal number by 2 repeatedly and record the remainders. If you need to translate binary values back to base-10, you can follow the reverse binary to decimal conversion method. If you need to convert decimal values to base-16 instead, use our decimal to hexadecimal converter.

  1. Divide your decimal number by 2. Note the integer quotient and the remainder (either 0 or 1).
  2. Take the quotient and divide it by 2 again.
  3. Repeat this process until your integer quotient becomes 0.
  4. The binary equivalent is obtained by reading the remainders from the bottom to the top (the last remainder is the MSB, the first is the LSB).

Step-by-step example.

Let's convert the decimal number 25 into binary using the division method:

• 25 ÷ 2 = 12, Remainder = 1 (Least Significant Bit)
• 12 ÷ 2 = 6, Remainder = 0
• 6 ÷ 2 = 3, Remainder = 0
• 3 ÷ 2 = 1, Remainder = 1
• 1 ÷ 2 = 0, Remainder = 1 (Most Significant Bit)

Reading the remainders from bottom to top gives: 11001. Therefore, 2510 = 110012.

Method 2: Subtraction of powers of 2.

For mental conversions, it is often faster to find the largest power of 2 that fits into your decimal value, subtract it, and repeat for the remainder:

  • For 25, the largest power of 2 less than or equal to 25 is 16 (24). Subtracting 16 from 25 leaves 9.
  • The largest power of 2 fitting in 9 is 8 (23). Subtracting 8 leaves 1.
  • 4 (22) does not fit in 1 (write 0).
  • 2 (21) does not fit in 1 (write 0).
  • 1 (20) fits in 1 exactly (write 1).
  • Combine the coefficients: 1 · 24 + 1 · 23 + 0 · 22 + 0 · 21 + 1 · 20 = 110012.

Frequently Asked Questions

How do you convert decimal to binary?

To convert decimal to binary, perform repeated division by 2. Divide your number by 2 and record the remainder (0 or 1). Repeat the division using the quotient until you reach a quotient of 0. Write the remainders in reverse order (from last remainder to first remainder) to form the binary representation.

What is the binary representation of decimal 100?

The decimal number 100 is equal to 1100100 in binary. Dividing 100 repeatedly by 2 yields remainders of 0, 0, 1, 0, 0, 1, 1 (read bottom to top).

How do you convert a decimal float to binary?

Convert the integer part using repeated division by 2. Convert the fractional part using repeated multiplication by 2. For each multiplication, the integer part of the product (0 or 1) is recorded as the next binary digit, and the new fractional part is multiplied again until it reaches zero or the desired bit width is satisfied.

Decimal to Binary Chart

Decimal Binary
1610000
2511001
50110010
1001100100
25511111111
256100000000