Page 510 - Introduction to Information Optics
P. 510

9.3. Number Systems and Basic Operations     495

         For the third iteration, it is easily seen that the two digits to be added in a
                                    (2
       column originate from sp* and cf \ The half-addition rules in Fig. 9.12 can
                                          3>
       be applied, resulting in the sum string 4  together with the possible negative
               <3)
       carry c t~ . As analog to the second iteration, in the fourth iteration the
       half-subtraction symbolic substitution rules are used. Therefore, the half-
       addition and half-subtraction rules are used alternately, and for odd-time and
       even-time iterations, respectively.
         In reference to negabinary addition, one notices readily that for negabinary
       subtraction, the half-subtraction rules should be employed first and then the
       half-addition rules. This procedure will continue until no positive and negative
       carries occur.


         9.3.1.2.3. Unified Symbolic Arithmetic for Addition and Subtraction
         Generally speaking, both addition and subtraction can be performed easily
       by using two sets of substitution rules, one for half-addition and the other for
       half-subtraction. It is possible to combine the two sets of rules into one by
       introducing both positive and negative carries at the same time [55]. If we
                                                                     I)
                                                              l)
       define the left-hand side of the rules containing the pixels sf'~~ , Q  +O '"  and
            !)
                                                            s
       ff °'~  and and the right-hand side of the rules containing s\ \ c/Vf and c^+{\
       the two sets of double-in-double-out rules can be merged into one set of
       triple-in triple-out substitution rules. Since the condition that both c* and c-"
       equal to 1 does not happen, there are only six combinations for the nega-
       binary triple-in variables. The unified arithmetic truth table and the corre-
       sponding symbolic substitution rules are shown in Table 9.5 and Fig. 9,13.
       respectively.
                                              0)  (0   (0)
         The initial values of the three digit strings sj , cf \ cf  should be assigned
       before the addition and subtraction are performed. For addition, the augend a
       can be viewed as the initial sum, and the addend b can be viewed as the initial
       positive carry; while for subtraction, the minuend a can also be taken as the
       original sum, and the subtrahend b can be taken as the original negative carry.
       Thus, for addition and subtraction we can write the following conditions.



                                 0     0       0    0       1     0
                    I   ,        0—*    0      1 — »        0—*
           ct        cf+i        0     0       0     0      0     0
                         Si
                     c r+i       1     0       0    1       0     0
                    1   1        I-—*   0      0 — *        1—» 0
                                 0    1        1     0      1     0

                 Fig. 9.13. Substitution rules for unified negabinary arithmetic [55].
   505   506   507   508   509   510   511   512   513   514   515