Decimal is base 10 and binary is base 2.
The columns from right to left in base 10 are:
10^10 10^9 10^8 10^7 10^6 10^5 10^4 10^3 10^2 10^1 10^0
Similarly, the columns from right to left in base 2 are:
2^10 2^9 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
This site does a good job of explaining the conversion from decimal to binary.
http://www.math.grin.edu/~rebelsky/Courses/152/97F/Readings/student-binary
For example, take the number 157. The biggest column that goes into 157 is 128, which is the 2^7th column, so we put 1 in that column. Subtracting 128 from157, we get 29. We start all over again. The biggest binary number going into 29 is 16, which is the 2^4th column. When you subtract 16 from 29, you get 13. We start all over again. The biggest binary number going into 13 is 8. Subtracting 8 from 13, we get 5. Biggest number going in is 4, 2^2th column. 1 left over to go into the 2^0 column.
Pulling it all together, we get:
10011101.
Checking, 128 + 16 + 8 + 4 + 1 = 157.
Good luck.
Let me know if you have any questions.
Paul
×