EasyManua.ls Logo

Olivetti Programma 101 - Rounding Techniques; Addition, Subtraction, Multiplication Rounding; Division Quotient Rounding

Olivetti Programma 101
62 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rounding Techniques
Following are routines for rounding to the setting of the Decimal Wheel in addition, subtraction
and multiplication. Assume one value is stored in the B register and the second value in the e
register:
___________________________________________________________________________
ADDITION SUBTRACTION MULTIPLICATION ___________________________
B
B
B
Transfer first value to A register.
C + C - C x Perform operation.
R - R - R - Subtract complete result from trun cated result.
Transfer complete result to A register.
R - R - R - Subtract negative remainder from complete result.
A
A
A
Print rourded result.
___________________________________________________________________________
Following are techniques for rounding the Quotient in a division problem to the setting of the
Decimal Wheel:
METHOD 1:
Assume the divisor is in register B and the dividend is in register C.
C
Transfer dividend to A register.
B
÷
Divide dividend by divisor.
R
Transfer iemainder to A register.
C + Add dividend to remainder.
R
Transfer decimally correct dividend + remainder to A register.
B
÷
Divide dividend + remainder by divisor.
A
Print rounded Quotient.
This routine requires 7 instructions.
- 45 -

Related product manuals