38
How calculators calculate By Dr Purchase
Calculators do not compute values of certain functions (e.g. sin 47) by using a series or polynomial expansion. Instead calculators use an algorithm known as the CORDIC method (see Edwards et al. [1] ). The circuits in calculators can only perform the following elementary computations: • additions;
• subtractions;
• comparisons (stating whether a number is positive or negative);
• storage of a finite number of constants;
• digit shifts. The latter of these, digit shifts, deserves further clarification. The number system we use in everyday life is known as base 10 and includes the numbers n ± 10 (where n is a positive integer) then this will shift a number n places to the left (positive power) or n places to the right (negative power) keeping the decimal point 0,1,2,3,4,5,6,7,8,9. If we multiply a given number by
3 = ×
fixed.
For
example,
or
56386 .3
10
86. 3563
0006798426 .0 10 . Calculators (and computers) work in base 2 (binary) which include the numbers 0 and 1 only. To digit shift a binary 98426 .67 5 = × −
n ± 2 . The above operations are the only ones a
number we multiply it by
calculator can perform due to hardware restrictions.
The CORDIC algorithm only uses the above operations to calculate values such as , sin 56, 2 , 4.3 e , etc. The algorithm uses the following iterative
7 5
scheme:
−
k
x − = + = − = σ δ δ δ
ym x x 2
+
1
k
k
k k
−
k
2
y
y
+
1
k
k
k k
z
z
+
1
k
k
k k
Made with FlippingBook - Online Brochure Maker