Binary/Decimal Approximation

Binary/Decimal Approximation Binary/Decimal Approximation

01.08.2014 Views

Convert 1/3 to binary 1/3 = .b1 b2 b3 2/3 = b1.b2 b3 b1 = 0 4/3 = b2.b3 b4 b2 = 1 -> 1/3 repeat -> 1/3 = .01010101... = 1.0101..._2 x 2^(-2) 1

Convert 1/3 to binary<br />

1/3 = .b1 b2 b3<br />

2/3 = b1.b2 b3 b1 = 0<br />

4/3 = b2.b3 b4 b2 = 1 -> 1/3 repeat<br />

-> 1/3 = .01010101... = 1.0101..._2 x 2^(-2)<br />

1


More Explanation on <strong>Binary</strong>/<strong>Decimal</strong> <strong>Approximation</strong><br />

The range of values from approximately 0.000641 to 0.000702<br />

would all get the same representation to four binary digit<br />

precision.<br />

To see this, note that 1.325 × 2 −11 = .0006926 is in the<br />

given range. The binary representation of this number is<br />

0.00000000001011 2 .<br />

Any number with a binary representation between<br />

0.000000000010101000... 2 and<br />

0.000000000010111000... 2 will be approximated by<br />

2


0.00000000001011 2 . In other words, any number within<br />

2 −15 of 0.00000000001011 2 will be approximated by<br />

0.00000000001011 2 .<br />

To see what these numbers are in decimal form, we can do<br />

the computation in R:<br />

> 2^(-11)*(1.375) + 2^(-15)<br />

[1] 0.0007019043<br />

> 2^(-11)*(1.375) - 2^(-15)<br />

[1] 0.0006408691<br />

Thus, everything within the range .000641 and .0007019 will<br />

be approximated by the same 4 digit binary number.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!