Guide to converting
decimal to binary.
Binary is number base system, used by computers. It works on base 2, just as decimal works on base 10
In decimal, numbers are sums of exponents of 10. For example, the number 2503 is (2*10^3)+(5*10^2)+(0*10^1)+(3*10^0)
Which is 2000+500+0+3
In binary, numbers are sums of exponents of 2. For example, the number 1101 is (1*2^3)+(1*2^2)+(0*2^1)+(1*2^0)
Which is 8+4+0+1
The easiest way to convert to binary is to take the largest exponent of two which is smaller than the number you want to convert, and write a table of the exponents of two, starting with that number, going from largest to smallest. For example, if we wanted to convert the number 72, the smallest exponent of two smaller than 72 is 64 (2^6). We'd write:
64 32 16 8 4 2 1
Then for each number, we'd write either a 1 or a 0 beneath it. For each number with a 1 beneath it, we add that number to our total. To decide whether to write a 1 or a 0, we check if (total + number) is greater than the number that we want to convert. If it is greater, we write a 0, if it's smaller or equal to the number we want to convert, we write a 1.
So to start, our total is 0. 64 is smaller than 72 so we place a 1 beneath it.
64 32 16 8 4 2 1
1
The next number is 32, our total now is 64. 64+32 is 96, which is larger than 72, so we place a 0 beneath 32.
64 32 16 8 4 2 1
1 0
Next is 16, our total is still 64. 64 + 16 is 80, which is too large. So we place a 0 beneath 16.
64 32 16 8 4 2 1
1 0 0
Next is 8. Our total is 64. 64 + 8 is 72. Which is the number we want. So we place a 1 beneath it.
64 32 16 8 4 2 1
1 0 0 1
Then of course, the rest of the numbers will be 0, since 72 + any positive number will be too large.
64 32 16 8 4 2 1
1 0 0 1 0 0 0
So 72 in binary is 1001000. To convert back to decimal, you simply take all the numbers with 1's underneath them and add them together. So in this case, 64+8=72. So 1001000 = 72.