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.
New to topics? Read the docs here!
