On Fri, Jul 19, 2019, 8:00 AM Ken Pettit <petti...@gmail.com> wrote:

> On 7/18/19 6:20 PM, John R. Hogerhuis wrote:
>
> > I guess the value of (packed) BCD is multiply / divide by 10 is a bit
> > shift operation. And base 10 rounding operations are straightforward.
> >
>
> You don't even need a bit shift ... just subtract 1 from the exponent
>

Yes but I think when you add or subtract two numbers, if the exponents
aren't equal you have to align the decimal points. You can do that by
indexing and shifting. That is one advantage of packed BCD over binary
depending on the difference in exponents. Unpacked BCD would require no
shifts to align but it is really wasteful of space / precision.

-- John.

>

Reply via email to