Decimal to Binary Conversion of Unsigned Numbers
Example of decimal to binary conversion:
The decimal positive integer 330 can be deconstructed:
33010 = 3*100 + 3*10 + 0*1 = 1*102 + 2*101 + 5*10.
Each digit to the left has a multiplier that is 10 times the previous digit. Binary representations of positive integers can be understood in a similar way as their decimal counterparts. For instance:
9910 = 1*64 + 1*32 + 0*16 + 0*8 + 0*4 + 1*2 + 1*1 = 1*26 + 1*25 + 0*24 + 0*23 + 0*22 + 1*21 + 1*20.
or 9910 = 11000112
The subscript 2 denotes a binary number and the subscript 10 denotes a decimal number. The number 11000112 is represented by 7 bits. Any number can be converted from decimal to binary, by finding all of the powers of 2 that add up to the number in question. In our case the powers were 26, 25, 21 and 20. You can see this is similar to the decimal deconstruction of the number 330 that was done earlier.