How to Convert From Decimal to Binary

by 11R in Circuits > Computers

11408 Views, 80 Favorites, 0 Comments

How to Convert From Decimal to Binary

MWA4-intro.PNG

In this Instructable, you will learn how to convert numbers from decimal to binary. Decimal numbers can have the values 0-9 for each place-value. Binary numbers are only made up of the values 0 and 1.

While decimal numbers are used often in everyday life, binary is mostly limited to computer science and engineering.

This Instructable should take you about 10 minutes to read and understand if you are a beginner in the subject.

Materials Needed:

  • Calculator
  • Pen
  • Paper

Draw Your Table

MWA4-00.PNG

First, you draw a t-shaped table like the one shown in Figure 1.

Pick a Decimal Number to Convert to Binary

MWA4-0.PNG

1. Choose a decimal number you want to convert to binary and write it in the top-left of the table header.

  • For this Instructable, the number 139 is chosen as an example, as shown in Figure 2.

2. Write "/2" in the top-right of the table header.

Fill in the First Row

MWA4-1.PNG

1. Divide your decimal number by 2 and place the result in the left column. If the result has a remainder, don't include it in the left column.

  • For the example, the operation 139/2 results in a value of 69.5, as shown in Figure 3.

2. Place the remainder (0 or 1) of your result in the right column. Values that end in ".5" have a remainder of 1 and those that end in ".0" have a remainder of 0.

  • For the example, 69.5 has a remainder of 1, as shown in Figure 3.

Fill in the Next Row

MWA4-2.PNG

1. Divide your result from the previous row by 2 to get your new result. Again, don't include the remainder in the left column.

2. Place the remainder of your new result in the right column.

Repeat Step 4

MWA4-10.PNG

Repeat Step 4 until you get a result of 0 in the left column, as shown in Figure 5.

Get Your Result

MWA4-11.PNG

1. The original decimal number you chose is now a binary number in the right column, as shown in Figure 6.

2. Write the binary number from bottom to top, as shown by the red arrow in Figure 6.

  • For the example, the decimal number 139 is equal to the binary number 10001011.

Summary

To recap, getting a binary number from a decimal number is just a process of successive division by 2. You get the binary number from the remainder of the divisions.

The reason you divide by 2 is because binary is base 2. If you wanted an answer in a different base, such as base 16, you would divide by 16 instead of 2.

Other Resources

The links below will take you to different sites where you can learn more about binary and other numeral systems.

  • This link will take you to the Wolfram MathWorld to learn more about binary.
  • This link will take you to Wikipedia to learn how to count in binary
  • This link will take you to Khan Academy, which has videos showing you how to add and multiply in binary.