Friday, February 23, 2007

Binary and such

the binary number 110010101, converted to decimal, is 405. the number represents 1+4+16+128+256=405. you take the right-most number and apply 2 to the power of 0, which leaves 1. you then add that to the next number 1, multiplied by the appropriate power of 2, which would be 2 to the power of 2, or 4. and so on.
the decimal number 529, converted to binary, is 1000010001. the easiest way i know of to convert decimals to binary is to divide the number by 2 until you get to 1, using "remainders" instead of decimals. for example, 529/2=264 r 1, then 264/2=132 r 0, and so on.
in positional number systems, the value of a number is based on its position in the string of numbers, and the base number explains how much the numbers, as they progress to the left, are multiplied by. non-positional number systems do not give a value to the different numbers, instead simply assigning them the number "face value" that is understood in conventional terms. for example, to represent the number "x" in a non-positional number system would require "x" amount of figures. this is not as efficient as a positional number system for representing large numbers.

No comments: