90 Arithmetic The process of rounding, then, would have the following steps - • Determine from register A if rounding is required (Le., if it's greater than or equal to 5). If rounding is not required, take no further action. If rounding is required, then load register B with 1 and execute an MWA instruction. This has the effect of incrementing the mantissa in Ar2 by 1. This action is an easier method than setting Arl to 1 and executing an FXA and it's faster, too. Don't forget to check DC for an overflow. • One way the sequence of rounding could appear is - lU ISOURCE ADA =~5 ~:::;C.:::t 'f 1:;:* f:! clc'hii"'! ISOURCE SAM *+3 If' 'f E':;:.S t !·"!.::i.i'-i ::::; !
:=._1 r·cfi..~!"'·!cf 'i t"i=;;} C;(::'t j·-'E:":::I.CJ::) t () .:::Lcfcl 1. t () f':ir';~~~ Add 1 ~u least s1 f1cant digit of Ar2 Floating Point Multiplication Twelve-digit BCD floating-point multiplication is partially accomplished using the FMP instruc- tion. This instruction effectively multiplies the value in the Arl register by a digit contained in B and adds the result to a partial product in Ar2. Since, in the full multiplication process, exponents are merely added together, that part of the process is trivial. The ultimate sign of the product is also a trivial matter, determined by inspection of the signs of the original operands.
Then the only matter of difficulty in the process is the actual multiplication of the mantissas. By way of explanation, assume that there are two mantissas to be multiplied - multiplicand = ABC D multiplier = W X Y Z Just four digits are used to reduce the amount of symbolism required of the example. The same procedures and conclusions are applicable to a full twelve BCD digits.