Binary number: Difference between revisions

Content deleted Content added
Wdr62 (talk | contribs)
Fractions: clarified
Tags: Mobile edit Mobile web edit
Line 202:
==Fractions==
 
TheIn binary expansionsarithmetic, the binary expansion of a [[fractionsfraction]] in binary arithmetic [[Repeating decimal|terminateterminates]] only if the [[denominator]] is a [[power of 2]]. As a result, 1/10 does not have a finite binary representation ('''10''' has prime factors '''2''' and '''5'''). This causes 10 × 1/10 not to precisely equal 1 in binary [[floating-point arithmetic]]. As an example, to interpret the binary expressionexpansion forof 1/3 =is .010101..., thiswhich means that
:<math>\frac 1/313 = 0 ×\times '''2<sup>−1</sup>'''^{-1} + 1 ×\times '''2<sup>−2</sup>'''^{-2} + 0 ×\times '''2<sup>−3</sup>'''^{-3} + 1 ×\times '''2<sup>−4</sup>'''^{-4} + \cdots... = 0.3125 + ...</math>
An exact value cannot be found with a sum of a finite number of inverse powers of two, the zeros and ones in the binary representation of 1/3 alternate forever.
 
{| class="wikitable"