Convert Decimal to Binary

dec
bin

How to Convert Decimal to Binary

Method-1: 

Steps for Conversion from Decimal to Binary

  1. Write down any decimal number.
  2. Divide the decimal number by 2.
  3. write down the integer quotient for the next iteration.
  4. write down the remainder for the binary digit.
  5. Repeat dividing and writing down remainders until the result of the division is 0.

Example: Convert 15 decimal to binary:

So 15 decimal= 1111
Divide by 2 
Quotient
Remainder
Bit Postiion
15/2 7 1 0
7/2 3 1 1
3/2 1 1 2
1/2 0 1 3

 

Method 2:

Look for the greatest power of 2. Choose the biggest number that will fit into the number you are converting. 8 is the greatest power of two that will fit into 15, so write a 1 beneath this box in your chart for the leftmost binary digit.

Example: Convert 15 decimal to binary:

So 15 decimal = 1111
Decimal 128 64 32 16  8  4 2 1
Binary 0 0 0 0  1  1 1 1