How to Change Decimal to Binary
People tend to express numbers in decimal (base ten) form. But computers think in binary (base two) terms. Sometimes, you have to speak their language, so it's useful to know how to express a decimal number in binary form. The key is to understand that the successive digits (or bits, in the case of binary) in a number represent increasing powers of the base as you move from right to left, starting with the power of zero (any number to the power zero is defined to be 1). It's easy to convert decimal to binary. If you can divide by two, you're halfway there.
Instructions
-
-
1
Divide the decimal number by two. The result is a quotient and a remainder. Write the remainder, which will be a zero or a one, as are all binary numbers. For example, to convert 437 to binary, you start by computing 437/2 = 218, remainder one. Write the one as the rightmost bit of your answer.
-
2
If the quotient above equals zero, then you are finished. Otherwise, divide it by two. In the example, 218/2 = 109. When the number divides evenly, place a zero in the next place of your binary number, working from right to left, so you now have 01.
-
-
3
Continue to divide successive quotients by two, following the rules above. In your example, 109/2 = 54, remainder one, giving you 101 in your answer. Then, 54/2 = 27, so you now have 0101. Then, 27/2 = 13, remainder one, so you write 10101. Then, 13/2 = 6, remainder one, and you write 110101. Write 6/2 = 3, and your answer becomes 0110101. Now, 3/2 = 1, remainder one, and your binary number becomes 10110101. Finally, 1/2 = 0, remainder one, and you write 110110101.
-
4
Check your work. In the example, the rightmost bit represents two to the zero power, with powers successively increasing as you move to the left, with the leftmost bit representing two to the ninth power in this case. So, your binary number represents (1 x 1) + (0 x 2) + (1 x 4) + (0 x 8) + (1 x 16) + (1 x 32) + (0 x 64) + (1 x 128) + (1 x 256) = 1 + 0 + 4 + 0 + 16 + 32 + 0 + 128 + 256 = 437. The answer checks.
-
1
Tips & Warnings
It's easy to make mistakes. Always check your work.
Once you understand how to do it yourself, use an online converter (see Resources) to convert numbers quickly and without error.
References
Resources
- Photo Credit binary numbers image by Photosani from Fotolia.com