BCD accuracy (was: HP 85/Rocky Mountain BASIC replacement)

From: ajp166 <ajp166_at_bellatlantic.net>
Date: Fri Apr 20 23:47:06 2001

From: Jim Battle <frustum_at_pacbell.net>
>Unless you are doing financial work where the fractional numbers tend to
be
>inherently decimal, BCD arithmetic, for a given number of bytes of
storage,
>is less accurate than binary. As a BCD byte can represent only 100
states
>vs 256 for binary, you are going to lose more than one bit of accuracy
per


Sinppage....


Never confuse accuracy with resolution or range.

Most BCD systems were less prone to truncation, rounding and other
cumulative errors within their range. Binary for the number of bits gave
more
resolution but sometimes at the expense of accuracy.

>So, OK, 0.1 (base 10) can't be exactly represented in a binary format,
but
>0.11111 (base 16) can't be represented exactly in an 8B BCD
representation.


If you meant .1 and got .11111 that would be a significant error! same
for
say meaning .1 and getting .09999.

Allison
Received on Fri Apr 20 2001 - 23:47:06 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:28 BST