Converting decimal to binary requires repeated division by 2 and taking the remainder to determine whether a given placeholder of the digit is 0 or 1. If there is a binary converter online, it's possible to simply enter the decimal number and let the program do the work. Knowing how to do it manually is useful to computer programmers.Continue Reading
For example, assume the decimal number to be converted is 35. Divide it by 2 to get 17 with a remainder of 1. This determines the rightmost digit of the binary number, which represents 1, or 2 to the power of 0. Each digit to the left is a power of 2 higher.
When 17 is divided by 2, the answer is 8R1, or 8 with a remainder of 1. This result indicates that the second binary digit is 1. The next division, 8 by 2, is 4R0. When 4 is divided by 2, the answer is 2R0, and 2 divided by 2 leaves 1R0. Then, 1 divided by 2 leaves 0R1.
The calculations yield the binary number 100011.
To confirm the calculation, convert the binary number back to decimal by multiplying the 1s on the number by the appropriate power of 2. Doing this yields 2^5 + 2^1 + 2^0, or 32 + 2 + 1, or 35, which is the original decimal number.