Section 2.1
Binary-To-Decimal Conversion


Any binary number can be converted to its decimal equivalent simply by summing together the weights of the various positions in the binary number which contain a 1.

1 1 0 1 1 2

(binary)

24+23+0+21+20

= 16+8+0+2+1
= 2710 (decimal)

and

1 0 1 1 0 1 0 1 2

(binary)

27+0+25+24+0+22+0+20

= 128+0+32+16+0+4+0+1
= 18110 (decimal)

You should noticed the method is find the weights (i.e., powers of 2) for each bit position that contains a 1, and then to add them up.