Every real number has a binary expansionFor , construct it by repeated doubling. Set , then and , using the floor function. Each remainder stays in , and induction givesThe remaining error is less than , so the finite partial sums converge to . For , choose every binary digit equal to one and use the geometric series.
An expansion need not be unique: . For , this ambiguity occurs precisely at the dyadic rationals, through a terminating expansion and an alternative ending in ones. At the endpoints, the displayed purely fractional form uses all zeros for zero and all ones for one. A general nonnegative real number is represented by adding the finite binary representation of its floor to an expansion of its fractional part; a negative real number is handled by a separate sign. In that broader notation, too.
A base-two positional fraction with a binary point separating nonnegative and negative powers of two. For example, . A finite expansion is a dyadic rational: with fractional places, its value is an integer divided by . Conversely, any nonnegative reduced fraction whose denominator is a power of two has a finite binary expansion. Leading integer zeroes and trailing fractional zeroes do not change its value.
A representation with and only finitely many nonzero coefficients. If counts these representations, then , , and for . The integer parity of determines whether the coefficient of must be 1 or may be 0 or 2.
A dyadic rational is a rational number of the form with an integer and a nonnegative integer . Examples are , , zero and every integer. In lowest terms, its denominator is a power of two, so its magnitude has a finite binary expansion.
A positive dyadic rational also has a binary representation ending in infinitely many ones. Replacing the last nonzero binary digit by zero and filling all lower places with ones preserves the value, becauseFor example, . Zero has no second nonnegative expansion of this type. The same ambiguity applies to the magnitude of a negative dyadic rational, with its sign kept separately.
Articles by others on the same topic
There are currently no matching articles.
