Page 511 - Introduction to Information Optics
P. 511

9. Computing with Optics

                                     Table 9.5
                            Truth Table for Unified Negabinary
                               Addition/Subtraction [55]



                       0    0    0          0      0     0
                       0    0    ]          0      0     1
                        1   0    0          0      0     1
                        i   0    I          0      1     0
                       0    1    0          1      0     1
                       0    1    1          0      0     0



         For addition:


                     ,, + (0) _ L                                   (9.Ha)
                     LI    f t-,
                     ,,-(0)  A  /;                      -1).
                     <-i  ~ U,  (I —  -M,    1,0,
         For subtraction:

                         = a,,
                                                                    (9.14b)
                                           -1,0, !,...,#- 1).

       After the initialization, both addition and subtraction of two numbers can be
       carried out in parallel by the successive use of the same substitution rules listed
       above. At each iteration, at least 1 bit of the final result for a pair of operands
       can be obtained. Therefore, a unified symbolic arithmetic for addition and
       subtraction has been established.
         For clarity and without the loss of generality, addition of the 4-bit integral
       numbers A = (3) 10 = (0111)_ 2 and B — ( — 6) 10 = (1110)_ 2, and subtraction
       of the numbers A =(-3) 10 = (1101)_ 2 and B = (-9) 10 = (1011)_ 2 are illus-
       trated below:

               -6111 0     0000       0 1
                3011 1       100 1      010 1     110 1 (=-3 10 )
                  000 0    011 0      0 0

                  0000     001 0      0 0
               -3 110 1      011 0      001 0                1 101 0
             ) - 9 101 1   000 0      0 1                   (=610)
   506   507   508   509   510   511   512   513   514   515   516