next up previous
Next: Scientific Notation Up: Number Systems Previous: Conversion of Fractions

Approximate Values

Any fraction can be represented as the ratio of two integers, N/D, where N is the numerator and D is the denominator. The set of all such ratios forms the rational numbers.

Some ratios produce a repeating pattern when converted to weighted positional notation.

Example:

The decimal fraction 1/3 = .3333.... Repeated digits are indicated by a bar. For example, tex2html_wrap_inline2716 .

Repeating fractions occur in all bases.

Example:

Convert decimal 0.6 to binary using the multiplication method of the previous section:

tabular440

Step 5 of the conversion matches step 1 exactly. Therefore, the process will produce the same results as in the first 4 steps repeatedly and will never terminate.

The binary representation is tex2html_wrap_inline2744 .

To represent a repeating fraction exactly, the numerator and denominator must be stored as separate integers. Weighted positional numbers can be used to approximate a repeating fraction.

When a repeating proper fraction is represented using m bits, the maximum error is tex2html_wrap_inline2746 .

Some numbers defined by mathematical equations form infinite, non-repeating fractions. Examples are: tex2html_wrap_inline2748 .

These are called irrational numbers and can only be represented approximately in any finite representation.



CS 301 Class Account
Mon Sep 13 11:15:41 ADT 1999