Page 70 - Engineering Digital Design
P. 70
2.5 CONVERSION BETWEEN NUMBER SYSTEMS 41
where / is the product integer, /] = b-\, and FQ is the product fraction arranged as F\ =
r~\b-2 + r~'(&_3 + • • • + b- p)) • • -)r- By repeated multiplication by r of the remaining
fractions F,, the resulting integers yield (b-\, b-2, £-3..., b- m\ in that order.
The conversion just described is called the radix multiply method and is perfectly general
for converting between fractions of different radices. However, as in the case of integer
conversion, the requirement is that the arithmetic required by -N s x r must be carried out
in source radix, s. For noncomputer use by humans, this procedure is usually limited to
fraction conversions A/io —>• N r, where the source radix is 10 (decimal). Algorithm 2.3
gives the recommended methods for converting between fractions of different radices. The
radix multiply method is well suited to computer use.
Algorithm 2.3: -N r +~ >N S Fraction Conversion
(1) Use Eq, (2.2) and the substitution method with base s arithmetic, or
(2) Use the radix multiply method of Eq. (2.8) with source radix s arithmetic.
In either case for noncomputer means, if the source radix is other than 2 or 10, convert
the fraction as follows: -N s -> -N 2 or 10 -> -N r so that base 2 or 10 arithmetic can be
applied.
Shown in Table 2.5 are the recommended methods given in some detail for fraction
conversion by noncomputer means. Notice again the partitioning that is now required for
conversion between binary fractions and those for BCH and BCO.
For any integer of source radix s, there exists an exact representation in radix r. This is not
the case for a fraction whose conversion is a geometrical progression that never converges.
Table 2.5 Summary of recommended methods for fraction conversion
by noncomputer means
Fraction Conversion
Conversion Method
Radix multiplication by using Eq. (2.8)
•#io- > -N r
•#*-> •NiQ Eq. (2.2) or (2.6)
•#sW 10 -+ '#r)r^lo •#, -+ -#io by Eq. (2.2) or (2.6)
•#io —*• -N r radix multiplication by Eq. (2.5)
Special Cases for Binary Forms
•#2^ •#io Positional weighting
•#2 -> •NBCH Partition • A^ into groups of four bits starting from
radix point, then apply Table 2.3
•#2 -> •NBCO Partition -A^ into groups of three bits starting from
radix point, then apply Table 2.3
•NBCH -> -#2 Reverse of -A^ — ^ -#sc//
•NBCO ^•#2 Reverse of -A^ —>• -#sco
-
•NBCH ->• -#sco •NBCH ~^ #2 ~^ ~NBCO
•NBCO -* -#fic// •NBCO — >• -#2 — > -NBCH
•NBCD -> -#x« Add0011 2 (=3io)to# BC D
•N XS3 --+ "#5CD Subtract 001 1 2 (= 3 JQ) from NXSS