The Binary System

Consider the number 2365. Recall that the "5" is in the "ones" place, the "6" is in the "tens" place, the "3" is in the "hundreds" place and the "2" is in the "thousands" place. Thus we know that this number is numerically equivalent to

2365 = 2 * 1000 + 3 * 100 + 6 * 10 + 5 * 1

or

2365 = 2 * 103 + 3 * 102 + 6 * 101 + 5 * 100

Indeed, we are so used to it that we don't even think about it, but "2365" is really just shorthand for the above expression.

The same thing works in the base-2 number system. Only rather than the places being powers of 10, they are powers of 2.

First, here are the powers of two (expressed in the usual base-10 system)

20= 1
21= 2
22= 4
23= 8
24= 16
25= 32
26= 64
27= 128
28= 256
29= 512
210=1024

In the binary system, the number "1101" really means

1101 = 1 * 23 + 1 * 22 + 0 * 21 + 1 * 20

or

11012=1 * 8 + 1 * 4 + 0 * 2 + 1 * 1
 = 8 + 4 + 0 + 1
 =1310

The places in a binary number are named by the power of two that they represent:

                              1 1 0 1
                              | | | |
                              | | | ones place
			      | | |
                              | | twos place
			      | |
                              | fours place
                              |
			      eights place

Exercise

Continuing your counting past 15 and determine the binary representation for your age.


[prev]