Binary Representation vs. Decimal

When we write the number 2345 we imply (without any further clarification) that what we actually mean is:

Two times thousand + Three times hundred + four times ten + five

or

2 * 103 + 3 * 102 + 4 * 101 + 5 * 100

But this is only an agreement: If we do not specify the base, then it is assumed to be 10.

Now suppose that our agreement was that the base is 7. Then the number 2345 would have been interpreted as:

2 * 73 + 3 * 72 + 4 * 71 + 5 * 70

Which would have resulted to the decimal number: 2 * 343 +3 * 49 + 4 * 7 + 5 = 866.

We can be more specific if we write  234510  and  23457  where the subscript denotes the base used.

Note that if the base is 7 then we only need the digits 0,1,2,3,4,5,6 to represent any number. If we have 7, then we write 107  and, for 8 we write 117,  for 9 we write 127, etc..

This brings us to the binary representation. What should the base be if only digits 0 and 1 are to be used? The answer of course is 2.

If we write 1000110012 , then what we mean, in decimal representation, is:

1 * 28 + 1 * 24 + 1 *23 + 1 * 20 = 256 + 16 + 18 + 1 = 281

For numbers involving parts which are less than 1, the same rules apply.

For example, 12.438 stands for 1 * 101 + 2 * 100 + 4 * 10-1 + 3 * 10-2 + 8 * 10-3 and 1011.01112 stand for 23 + 21 + 20 + 2-2 + 2-3 + 2-4 which in decimal representation gives:

8 + 2 + 1 + 0.25 + 0.125 + 0.0625 = 11.4375

Similarly we can convert a decimal number into binary. For example if we have the decimal number 47 we can write:

47

= 1 + 2 (23)

= 1 + 2 ( 1 + 2 ( 11 ) )

= 1 + 2 ( 1 + 2 ( 1 + 2 ( 5 ) ) )

= 1 + 2 ( 1 + 2 ( 1 + 2 ( 1 + 2 ( 2 ) ) ) )

= 1 + 2 ( 1 + 2 ( 1 + 2 ( 1 + 2 ( 0 + 2 ( 1 ) ) ) ) )

which results in:

101111 2