Binary number double the number to be converted, record if the result is at least 1, and then throw away the integer part. For example, formula_10, in binary, is: Thus the repeating decimal fraction 0... is equivalent to the repeating binary fraction 0... . Or for example, 0.1, in binary, is: This is also a repeating binary fraction 0.0... . It may come as a surprise that terminating decimal fractions can have repeating expansions in binary. It is for this reason that many are surprised to discover that 0.1 + ... + 0.1, (10 additions) differs from 1 in floating point arithmetic.
Binary logarithm and ISO 80000-2), and (with a prior statement that the default base is 2) . Historically, the first application of binary logarithms was in music theory, by Leonhard Euler: the binary logarithm of a frequency ratio of two musical tones gives the number of octaves by which the tones differ. Binary logarithms can be used to calculate the length of the representation of a number in the binary numeral system, or the number of bits needed to encode a message in information theory. In computer science, they count the number of steps needed for binary search and related algorithms. Other