Optical arithmetic logic using the modified signed-digit redundant number representation
STATEMENT OF GOVERNMENT INTEREST 
     The invention described herein may be manufactured and used by or for the Government of the United States for governmental purposes without the payment of any royalties thereon or therefore. 
    
    
     BACKGROUND OF THE INVENTION 
     Modern signal, image, and information processing are relying more and more on the use of matrix algebra as a basic computational tool. In addition, many problems require a real-time computational capability. For these reasons, emphasis is currently being placed on the development of dedicated electronic parallel-processing devices using VLSI/VHSIC technology for performing the intensive computations required in numerical matrix algebra. Recent interest of using optical techniques for performing matrix operations is becoming more clearly evident. The innate parallelism, non-interfering communication and wide bandwidth of optical processing systems have successfully demonstrated its strengths in performing convolutions and correlations as well as a variety of linear transform operations. Optical or photonic computing will have significant impact on general matrix computation, provided that new concepts for improving the precision are developed. 
     One development which has improved the precision of optical computations employs an algorithm for performing multiplications and additions using optical convolving devices. This was the subject matter of a presentation by H. J. Whitehouse et al, entitled &#34;Aspects of Signal Processing with Emphasis on Underwater Acoustics&#34;, Part 2, G. Tacconi, edition, Reidel, Dordrecht, The Netherlands (1977) and D. Psaltis et al, in their article entitled &#34;Accurate Numerical Computation By Optical Convolution&#34;, in 1980 International Optical Computing Conference Book II. W. T. Rhodes edition, Proc., SPIE 232, 151 (1980). The algorithm identified in these articles has been become popularly known as the digital multiplication by analog convolution (DMAC) algorithm. For the case of radix 2, for example, the DMAC algorithm is novel in that binary numbers may be added without carries if the output is allowed to be represented in a mixed binary format. In the mixed binary format, as in binary arithmetic, each digit is weighted by a power of 2, but unlike binary arithmetic, the value of each digit can be greater than 2. It is the elimination of the need for carries that makes this technique particularly attractive in terms of optical implementation. The DMAC algorithm has been used in optical architectures for performing matrix multiplication involving numbers expressed in fixed-point form. Such applications are documented for example, by the article by W. C. Collins et al entitled &#34;Improved Accuracy for an Optical Iterative Processor,&#34; in Bragg Signal Processing and Output Devices, B. V. Markevitch and T. Kooij, editors, Proc., SPIE 352, 59, (1983); R. P. Bocker et al in their article entitled, &#34;Electrooptical Matrix Multiplication Using the Twos Complement Arithmetic for Improved Accuracy,&#34; Appl. Opt. 22, 2019 (1983); by P.S. Guilfoyle, in his article entitled &#34;Systolic Acousto-optic Binary Convolver,&#34; Opt. Engr. (23)/(1), 20 (1984), and A. P. Goutzoulis, in his article entitled &#34;Systolic Time-Integrating Acoustooptic Binary Processor,&#34; Appl. Opt. 23, 4095 (1984). A floating-point form of the DMAC algorithm has been expressed in an optical architecture by articles authored by R. P. Bocker et al, see &#34;Optical Matrix-Vector Multiplication Using Floating-Point Arithmetic,&#34; in Optical Computing Technical Digest, TuD3-1, OSA (1985), and &#34;Optical Flixed-Point Arithmetic,&#34; presented at SPIE Conference No. 564, Real Time Signal Processing VIII, W. J. Miceli and K. Bromley, chairmen, San Diego (August 1985). 
     With respect to the implementation of the DMAC algorithm however, as expressed above, there continues to be one main criticism when it is used in matrix multiplication. This criticism is the need for high-speed electronic analog-to-digital converters, required for converting mixed binary back to pure binary. In addition, the DMAC algorithm does not take full advantage of the intrinsic parallelism of optics. 
     A second optical technique for improving precision is based on the use of the residue number system. The literature is replete with references to this system, among which is the article by, A. Huang, entitled &#34;The Implementation of a Residue Arithmetic Unit Via Optical and Other Physical Phenomena,&#34; Digest of the International Optical Computing Conference, IEEE Catalog 75-CH0941-5C, (New York 1975), and A. Huang et al, article entitled &#34;Optical Computation Using Residue Arithmetic,&#34; Applied Optics 18, 149 (1979), and F. A. Horrigan et al, entitled &#34;Residue-Based Optical Processor,&#34; in Optical Processing Systems, W. T. Rhodes, editor, Proc., SPIE 185, 19 (1979), to name a few. The residue number system offers the appealing feature of carry-free addition, subtraction, and multiplication, thus making it very attractive for parallel processing. However, the main disadvantages of the residue number system concern the awkwardness of conversion from a residue form to a standard number representation, the difficulty in performing division, and the complexity in determining the correct sign of a subtraction operation. 
     The modified signed-digit (MSD) number representation has been set forth in the literature as a third approach for improving the precision of optically performed computations. The article by A. Avizienis, entitled &#34;Signed-Digit Number Representations for Fast Parallel Arithmetic,&#34; IRE Trans. Electronic Computers EC-10, 389 (1961), describes a class of number representations otherwise known as signed-digit representations. This number system offers carry-free addition and subtraction, fixed-point as well as floating-point capability, and the potiential for performing divisions optically. However, the paper, while presenting certain logic design problems, did not provide the necessary optical architecture for actually performing such computations. 
     Thus, there exist in the state-of-the-art the necessary optical architectures to implement the modified signed-digit number representation in addition, subtraction and multiplication, so that fully parallel carry-free operation is provided for with reduced complexity to realize the advantages of optical signal processing. 
     SUMMARY OF THE INVENTION 
     The present invention is directed to providing an apparatus and method for optically implementing the arithmetic computations with modified signed-digit numbers represented in trinary form. These computations involve addition, subtraction or multiplication depending on the configuration and arrangement of optical logic modules. The logic modules optionally are implemented in accordance with two schemes including three position optical binary encoding or three state optical polarization encoding. For addition of two trinary digit numbers an array of parallel modules effecting T and W logic functions receive operand trinary digit pairs made up of a corresponding operand digit from each number. All trinary digits pairs of the two trinary numbers are simultaneously received and optically processed in parallel to produce simultaneous and parallel optical first transfer and weight digits. A second array of parallel modules for effecting T&#39; and W&#39; logic functions, receives the first transfer and weight digits, with the exception of the first transfer and weight digits coming from the left most operand trinary data digits pair and the right most operand trinary data digits pair, to simultaneously and in parallel optically produce second transfer and weight digits that are fed to an interconnected array of T logic function modules. The output of the T modules when taken with the left and right first transfer and weight digits, is a trinary representation of the sum of the trinary numbers. Changing the length of the numbers can be accomodated by merely including redundant T-W and T&#39;-W&#39; modules, without changing the parallel, simultaneous computation time. Subtraction is performed by changing one of the trinary numbers to its complement via a parallel M logic function array and adding the complement as just described. Multiplication relies upon forming partial products with parallel M and O modules arranged in a paritial product generator array and then double adding with T-W and T&#39;-W&#39; modules. Multiplication is performed by generating partial products with M and O modules, then adding the partial products in pairs with T-W and T&#39;-W&#39; modules. 
     An optical three position binary encoding scheme calls for the fabrication of discrete modules associated with each of the logic functions. They may be made up of an (s) component having a diffraction grating or holographic element that distributes input triad beams onto a number of suitably disposed bistable elements. When two input triad beams impinge on the same bistable element, an output beam is transmitted from the element to either a (w), (t), (w&#39;), (t&#39;), (m) or (o) component. Each of these components have a prism array directing beams onto a holographic element which is associated with the logic functions of the W, T, W&#39;, T&#39;, M and O modules referred to above. Within the T, W, T&#39; and W&#39; modules, the input triad beams are directed differently, so that output triad beams provide transfer and weight digits that agree with truth tables associated with each of the modules. 
     An object of the invention is to provide for an optical implementation of the modified signed-digit numbers representation. 
     Another object of the invention is to provide for an optical implementation of the modified signed-digit number representation using a plurality of basic logic function modules. 
     Still another object is to provide for photonic computing of the modified signed-digit number representation in which, a plurality of optical outputs are provided simultaneously and in parallel. 
     Yet still another object is to provide for, optical implementation schemes of the modified signed-digit number representation each having the ability to perform addition, subtraction and multiplication. 
     Still yet another object is to provide for optical implementation of the MSD number representation, using redundant modules to accomodate different order numbers. 
     Still another object to provide for, the multiplication of numbers in the MSD representation by the addition of partial products to arrive at a fully parallel, simultaneous output. 
     Yet still another object is to provide for optical implementation of logic function modules by the select application of diffraction gratings and bistable elements used in conjunction with appropriately disposed prisms and additional gratings to assure reliable, responsive fully parallel and simultaneous operation. 
     Still another object is to provide for the optical implementation of logic functions to enable fully parallel simultaneous operation that advantageously incorporates fiber optics and associated optical signal processing components. 
     Yet another object is to provide for basic trinary logic modules (T, W, T&#39;, W&#39; and M) to optically implement MSD addition, subtraction and multiplication. 
     These and other objects of the invention will become more readily apparent from the ensuing specification and drawings when taken in conjunction with the appended claims. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 sets forth the truth tables for trinary logic elements T, W, T&#39; and W&#39;. 
     FIG. 2a sets forth the L, A and R elements of adder array modular assemblies for MSD addition and subtraction. 
     FIG. 2b sets forth a typical MSD addition-subtraction array for two 5-digit trinary numbers, digits showing an example of an addition are shown thereon. 
     FIG. 2c shows complement logic module array used to generate the MSD complement of an MSD positive number to allow the subtraction-addition with the array of FIG. 2b. 
     FIG. 3 shows a tree structure for multiplying two, four-digit trinary numbers. 
     FIG. 4 shows the optical transfer of beams across part of an (s) component with triad beam (a1 a2 a3)=(1 1 1) and triad beams (b1 b2 b3)=(0 0 0), the beam could be directed by optical fibers. 
     FIG. 5 depicts of component (s) in which the optical triad beams are (a1 a2 a3)=(0 0 0) and (b1 b2 b3)=(1 1 1), the (s) component being an integral part of the logic modules T, W, T&#39;, W&#39;, M and O, the beam could be directed by optical fibers. 
     FIG. 6 shows a bistable element c2 in an (s) component providing an output beam upon the coincidence of two input triad beams with (a1 a2 a3)=(1 0 0) and (b1 b2 b3)=(0 1 0). 
     FIG. 7 shows a (w) component used in conjunction with an (s) component to make a (W) logic function module, the beam could be directed by optical fibers. 
     FIG. 8 schematically sets for us a (t) component used in conjunction with an (s) component to provide a T logic function module, the beams could be directed by optical fibers. 
     FIG. 9 sets forth a (w&#39;) component used in conjunction with an (s) component to provide a W&#39; logic function element or module, the beams could be directed by optical fibers. 
     FIG. 10 is a depiction (t&#39;) component used in conjunction with an (s) component to provide a T&#39; logic function of a T&#39; logic function module, the beams could be directed by optical fibers. 
     FIG. 11 sets forth the combined (s) component and the (w) component which form a W trinary logic function module W, the beams could be directed by optical fibers. 
     FIG. 12 is a truth table for trinary logic modules M and O. 
     FIG. 13a shows an (m) component used in conjunction an (s) component to provide the M logic module function, the beams could be directed by optical fibers. 
     FIG. 13b schematically depicts the (o) component that is operatively associated with an (s) component to provide O logic module function, the beams could be directed by optical fibers. 
     FIG. 14 sets forth an optical trinary logic module M made up of the components (s) and (m) with (a1 a2 a3)=(0 0 1) and (b1 b2 b3)=(0 0 1) to yield (e1 e2 e3) of of (1 0 0). 
     FIG. 15 is a block diagram showing a partial product generator array of partial product generator modules. 
     FIG. 16 is a block diagram of a portion of partial product generator module for the trinary digit y o . 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The optical implementation advantageously realizes the advantages of the modified signed-digit (MSD) number system. This system is one of a class of redundant number systems, that is, for a given decimal number, more than one representation in the MSD system can be generated. Though, MSD algorithms accept binary inputs, the transformations taken place within the algorithm can yield results outside the set of binary numbers. These MSD numbers have digits from the digit set (-1, 0, and 1). 
     A more detailed discussion of the MSD representation is setforth in the article identified above by A. Avizienis. Briefly, the MSD representation is a subset of the signed-digit representation, which is a redundant number system of radix greater than two. The signed-digit number has a radix r and digit set, [-a, . . . ,-1,0,1, . . . ,a]. For a certain choice of r more than one digit set can be generated. A particular r is chosen: such that r/2≦a≦r-1 for even r. and (r+1)/2≦a≦r-1 for odd r. The MSD number system has r=2 which makes a=1 and gives the digit set D msd  equal to (1, 0, 1). Here it is to be noted that -1 designation is depicted as 1, where 1 is the logical complement of one. This is the only digit set for the MSD number representation. 
     Each decimal number is represented in the MSD number system by writing down the coefficient of the polynomial (N) 10  =[1,0,1,]2 P  -1+ . . . +[1,0,1]2 1  +[1,0,1]2° where (p) is the number of trinary bits of precision and one of the digits in brackets is selected to give the proper representation. For example, using 4-bit trinary precision for (N)=7 gives: 
     
         (7).sub.10 =(1)2.sup.3 +(-1)2.sup.2 +(1)2.sup.1 +(1)2°=[1 1 1 1].sub.msd, 
    
     or 7 can be expressed in MSD as: 
     
         (7).sub.10 =(0)2.sup.3 +(1)2.sup.2 +(1)2.sup.1 +(1)2°=[0 1 1 1].sub.msd. 
    
     The sign information is also carried along with this representation. An MSD negative number is the MSD complement of the MSD positive number. This feature becomes particularly useful in the implementing optical architecture to be discussed below for all that is necessary is to write the complement of one of the numbers and add it to effect its subtraction from the other. For example, using primes to denote complementation [1&#39;=1, 1&#39;-1, 0&#39;-0, so that a -7 is expressed as: 
     
         [(-7).sub.10 ]=[1 1 1 1].sub.msd. 
    
     
         or equivalently, 
    
     
         (-7).sub.10 =[0 1 1 1] 
    
     The MSD numbers have digits from the digit set (1, 0 and 1), carries (borrows) in addition (subtraction) are done implicitly by arranging the transformations on the inputs in such away that cancellation occurs at strategic locations by digits outside the binary set. Any of the MSD digits are allowed to appear in the output as well. The set of transformations by A. Avizienis in his article cited above, accomplishes this carry (borrow) -free addition (subtraction). To illustrate what is transpiring, an example of integer addition will follow using MSD addition and carry propagation, (standard binary) addition with both having binary inputs. First binary addition: 
     
         ______________________________________                                    
X              0 1 1 1 7                                                  
Y              0 1 0 1 5                                                  
               1 1 0 0 12                                                 
______________________________________                                    
 
    
     Procedure 
     step 1. 1⊕1=0- carry 1 
     step 2. (carry 1) ⊕1⊕0=0- carry 1 
     step 3. (carry 1) ⊕1⊕1=1- carry 1 
     step 4. (carry 1) ⊕0⊕0=1 
     Next the binary addition (binary inputs): 
     
         ______________________________________                                    
X        0 1 1 1                                                          
                7                                                         
Y        0 1 0 1                                                          
                5                                                         
T      0 1 1 1 .0.                                                        
W      .0. 0 0 -1 0                                                       
T&#39;     0 0 0 .0. .0.                                                      
W&#39;     0 1 1 0 0                                                          
Z      0 1 1 0 0                                                          
                12        (trinary AND of T&#39; &amp; W&#39;)                        
______________________________________                                    
 
    
     where the T and T&#39; sums are shifted one to the left and the (Z) sum is a straight trinary add of T&#39; and W&#39; in accordance with the relationship 1+1=1, 0+1=1, 0+1=1, 0+1=1, 1+1=1, 1+1=0, there is no shift in the (Z) summing process. The designation φ represents where no operation is performed and is equivalent to zero. Truth tables that correspond to the logic functions of modules T, W, T&#39; and W&#39; (to be described) are expressed in FIG. 1. The representations for T, W, T&#39; and W&#39; in the MSD example above, can be verified from the truth tables. The procedures for generating the functions from the truth tables in FIG. 1 are: 
     
         ______________________________________                                    
T, W from X and Y -                                                       
       X Y                                                                
step 1:                                                                   
       1 ⊕ 1→T.sub.1 = 1, W.sub.1 = 0                          
                        (compare this with step                           
                        1 above)                                          
step 2:                                                                   
       1 ⊕ 0→T.sub.2 = 1, W.sub.2 = -1                         
step 3:                                                                   
       1 ⊕ 1→T.sub.3 = 1, W.sub.3 = 0                          
step 4:                                                                   
       0 ⊕ 0→T.sub.4 = 0, W.sub.4 = 0                          
T&#39;, W&#39; from T and W -                                                     
       T W                                                                
step 5:                                                                   
       -1 ⊕ -1→T&#39;.sub.1 = 0, W&#39;.sub.1 = 0                      
                        step 7: 1 ⊕ 0 →T&#39;.sub.3 = 0,           
                        W&#39;.sub.3 = 1                                      
step 6:                                                                   
       1 ⊕ 0→T&#39;.sub.2 = 0, W&#39;.sub.2 = 1                        
                        step 8: 0 ⊕ 0 → W&#39;.sub.4               
______________________________________                                    
                        = 0                                               
 
    
     In the MSD example above, step 2 yields the proper W 2  required to cancel the T 1  from step 1, which puts a zero at the correct position in the result. The ability to do symmetric cancellation (1⊕1=0) is important to the logic operations in the MSD system; 1 and its complement 1 yield a third `neutral` digit 0. 
     When a carry would have been generated in binary addition, a symmetric cancellation occurs in MSD addition, obviating the need for the carry. However, it should be noted that carries generated in the most significant trinary bit do not produce this symmetric cancellation. Symmetric cancellation by itself is not sufficient to produce carry-free addition. The transfer of trinary bits to the next most significant position (the generation of T&#39;s and T 1  &#39;s) is actually a partial carry, with superfluous partial carries being annihilated by symmetric cancellation. 
     The symmetric cancellation and transfers work together in such a way that whenever a carry would have resulted while using binary addition, and that carry is to be added to 1 and 0 (carry 1)⊕1⊕0), as in step 2 of the above example, a 1 is generated to annihilate the unwanted partial carry, or transfer. A superfluous partial carry can also result when no carry would have been generated in standard binary addition. In this case a MSD number (a number with 1 for some of the digits) is the output though the inputs were binary. To illustrate binary and MSD addition of (10) 10  and (8) 10  with binary inputs and MSD outputs for the latter: 
     
         ______________________________________                                    
Binary Addition       MSD Addition                                        
______________________________________                                    
X        1 0 1 0 10       X         1 0 1 0                               
                                         10                               
Y        1 0 0 0  8       Y         1 0 0 0                               
                                          8                               
         1 0 0 1 0                                                        
                 18       T       1 0 1 0 .0.                             
                          W       0 0 0 -1 0                              
                          T&#39;      0 0 0 .0. .0.                           
                          W&#39;      1 0 1 -1 0                              
                          Z       1 0 1 -1 0                              
                                         18                               
______________________________________                                    
 
    
     Generate T, W from X and Y: 
     Step 1: X/0⊕Y/0→T 1  =0,W 1  =0 
     Step 2: 1⊕0→T 2  =1(superfluous partial carry), W 2  =1 
     Step 3: 0⊕0→T 3  =0,W 3  =0 
     Step 4: 1⊕1→T 4  =1,W 4  =0 
     Generate T&#39;, W&#39; from T and W: 
     Step 5: T/0⊕W/1→T&#39; 1  =0,W&#39; 1  =1 
     Step 6: 1⊕0→T&#39; 2  =0,W&#39; 2  =1 
     Step 7: 0⊕0→T&#39; 3  =0,W&#39; 3  =0 
     Step 8: 1⊕0→W&#39; 4  =1 
     Notice that the effect of the 1 in the result is to cancel the unwanted partial carry which was generated in step 2. 
     With the ability to do carry-free addition, parallel flow of the operands is made possible. This means that for algorithms requiring only addition and multiplication all trinary bits of the output are seen simultaneously when the algorithm terminates. 
     The MSD adder (subtracter with complementation) is a basic building block. Multiplication is achieved by cascading the adders to sum partial products. Cascading the adders for multiplication forms an addition tree where partial products are added in pairs at each level of the tree. The number of levels in the tree depends on the number of trinary digits of precision being used. For a four trinary digit multiplier, there are 2 levels in the tree. This arrangement is schematically depicted in FIG. 3. To illustrate the MSD multiplication (2) 10  ×(9) 10  : ##STR1## The θ&#39;s denote place holders included to normalize the partial products before input to the MSD adders. Since the basic building block of the MSD multiplier is the adder, it too is fully parallel. The partial products flow through their respective branches, in parallel, until the result appears at the root of the adder tree. 
     The modified signed-digit addition is carried out by performing MSD logic operations on the operand trinary digit pairs to generate the appropriate transfer-and-weight digits. Subtraction requires complementing one of the positive operands and adding it to produce the transfer-and-weight digits. These transfer-and-weight digits are used to generate a second set of transfer-and-weight digits, which are then summed to give the final output. The term transfer-and-weight are used to denote the logic elements or modules T, W, T&#39; and W&#39; to be elaborated on below. These transfer and weight digits are generated as the operands flow through the processing architecture in parallel, making addition of any length operands occur in the same amount of time. 
     In the MSD number system, two transfer arithmetic is performed on the operands, giving an implicit carry scheme. Demonstration of modified signed-digit addition or subtraction uses an array of basic trinary logic elements or modules appropriately connected together. There are four different types of trinary logic elements or modules required in such an array, and are designated by letters T, W, T&#39; and W&#39;. These are fabricated from optical elements to accomplish MSD logic operation in parallel and simultaneously irrespective of the length or magnitude of numbers represented. The trinary logic functions of the modules T, W, T&#39; and W&#39; are setout in the truth tables corresponding to each of these logic modules in FIG. 1. 
     The T, W, T&#39; and W&#39; modules are optically coupled together to form three adder elements of array modular assemblies L, A and R see FIG. 2a. These, in turn are optically coupled together to create an MSD adder array AA, see FIG. 2b. Each adder AA array requires one L (left) assembly, one R (right) assembly, and any number of A assemblies between the L and R assemblies that have their logic elements or modules T, W, T&#39; and W&#39; optically connected together, such as by optical fibers waveguides or other suitable optical means. Any number that can be expressed in trinary form can be accommodated for a fully parallel and simultaneous logic operation, by simply adding the appropriate number of the A assemblies between the L and R assemblies. 
     For example, looking to the MSD adder array of FIG. 2c, it is capable of performing addition between two 5-digit trinary numbers [x 4  (2 4 ),x 3  (2 3 ),x 2  (2 2 ), x(2 1 )x 0  (2 0 )] and [y 4  (2 4 ),y 3  (2 3 ),y 2  (2 2 ), y 1  (2 1 )y 0  (2 0 )]. The output is composed of 6-trinary digits [z 5  (2 5 ),z 4  (2 4 ),z 3  (2 3 ),z 2  (2 2 ),z 1  (2 1 ),z 0  (2 0 )]. This MSD adder array performs the addition of the decimal numbers (12) 10  and (27) 10 , in accordance with the truth tables in FIG. 1. The decimal number (12) 10  can be represented in the MSD number system by either of the two 5-digit trinary sequences [01100] [11100]. Similarly, the decimal number (27) 10   can be represented in the MSD number system by any one of the three 5-digit trinary sequences [11011], [11101] or [11111]. Addition is performed as shown in the examples in the following table: 
     
         ______________________________________                                    
(1)        [01100] + [11011] = [10100-1] = (39).sub.10.                   
(2)        [01100] + [1110-1] = [1010-11] = (39).sub.10.                  
(3)        [01100] + [111-11] = [10100-1] = (39).sub.10.                  
(4)        [1-1100] + [11011] = [10100-1] = (39).sub.10.                  
(5)        [1-1100] + [1110-1] = [1010-11] = (39).sub.10.                 
(6)        [1-1100] + [111-11] = [10100-1] = (39).sub.10.                 
______________________________________                                    
 
    
     Referring once again to FIG. 2b, example (4) in the table is depicted with its values appropriately inserted at the x and y inputs. The sum [101001]=39 is produced. 
     Suppose however, that 27 were to be subtracted from 12. The decimal number -27 in the MSD number representation is simply the complement of the MSD number associated with positive 27. Thus, -27 is represented by any one of the three 5-digit trinary sequences as [1 1 0 1 1], [1 1 1 0 1] or [1 1 1 1 1]. Subtraction results are arrived at by referring to the truth tables in accordance with the examples (7) through (12) in the following: 
     
         ______________________________________                                    
(7)       [01100] + [-1-10-1-1] = [-110001]  = (-15).sub.10.              
(8)       [01100] + [-1-1-101] = [-11001-1] = (-15).sub.10.               
(9)       [01100] + [-1-1-11-1] = [- 110001] = (-15).sub.10.              
(10)      [1-1100] + [-1-10-1-1] = [0-10001] = (-15).sub.10.              
(11)      [1-1100] + [-1-1-101] =  [0-10011] = (-15).sub.10.              
(12)      [1-1100] + [-1-1-11-1] = [0-10001] = (-15).sub.10.              
______________________________________                                    
 
    
     The four logic elements or modules T, W, T&#39; and W&#39; are optically implemented to accomplish the logic functions set out in FIG. 1. The examples given which avail themselves of part of present optical technological development are not be considered as limiting the scope of this invention concept. Modifications of technological improvements are embraced by salient features of this optical implementation. Prismatic arrays, holographic arrays, diffraction gratings, optical bistable array is etc. are in a constant state of evolution. Fiber optic implementation with suitably disposed appropriate couplers and fibers are foreseen as being constantly improved and can be substituted to generate equivalent logic functions as taught herein as it becomes readily apparent to one skilled in this art. 
     In the optical implementation relying on three position binary encoding, three input triad beams represent the operand trinary digits (1, 0, 1) required in the MSD arithmetic. 
     The basic building block of all of the logic modules T, W, T&#39; and W&#39; (as well as logic modules M and O to be described) is referred to as an (s) component see FIG. 4, 5 and 6. In FIG. 4 the (s) component has a diffraction grating or holographic element array 10 with three portions thereof, 10a, 10b, 10c at different positions, diffracting an incoming triad of beams a1, a2, a3, onto a bistable element array 20 having nine bistable elements, 20a-20i. The triad of optical beams denoted by (a1, a2, a3) is separated into nine separate beams of light with one beam impinging on each of the nine bistable elements of optical bistable array 20. Component (s) also has three other portions 10d, 10e, 10f, of the diffraction grating or holgraphic element array 10, receiving three impinging optical beams (b1, b2, b3), see FIG. 5. These portions are also fabricated to direct the beams (b1 b2 b3) into nine beams that impinge on elements 20a-i of the optical bistable array. 
     The impinging optical beams a1, a2, a3, and b1, b2, b3, are representative of input triads that as a set of three triads may represent (1, 0, 1). 
     FIG. 6, depicts a complete (s) component, with input triad beams at a1 and b2, which separated into a total of six beams of light. Two of the six beams arrive at the optical bistable element 20b, and the array transmits a light beam c2 at this point caused by the simultaneous inputs from a1, and b2. Since each optical bistable element of the array has the property of tranmitting light if and only when two beams of light impinge on that particular optical bistable element, bistable element 20b is the only array element which transmits light. Bistable elements or photo sensitive-light emitter devices are well established in the art that thresholds which transmit or generate light only when a sum threshold is exceeded. Thus, in an array of elements having this property, only the optical bistable element (20b) radiates a beam c2 for the input a1, and b2. There are a total of nine different combinations of input triads (a1, a2, a3) and (b1, b2, b3). These combinations are summarized: 
     
         ______________________________________                                    
(a1 a2 a3) (b1 b2 b3)                                                     
                     (c1 c2 c3 c4 c5 c6 c7 c8 c9)                         
______________________________________                                    
1 0 0      1 0 0     1 0 0 0 0 0 0 0 0                                    
1 0 0      0 1 0     0 1 0 0 0 0 0 0 0                                    
1 0 0      0 0 1     0 0 1 0 0 0 0 0 0                                    
0 1 0      1 0 0     0 0 0 1 0 0 0 0 0                                    
0 1 0      0 1 0     0 0 0 0 1 0 0 0 0                                    
0 1 0      0 0 1     0 0 0 0 0 1 0 0 0                                    
0 0 1      1 0 0     0 0 0 0 0 0 1 0 0                                    
0 0 1      0 1 0     0 0 0 0 0 0 0 1 0                                    
0 0 1      0 0 1     0 0 0 0 0 0 0 0 1                                    
______________________________________                                    
 
    
     It is to be noted, that a 1 in this table corresponds to the presence of an optical beam and a 0 refers to an optical beam off. (a1, a2, a3=001) indicates that optical beams a1, a2, are off and that beam a3 is on. 
     The optical encoding scheme for representing the trinary digits +1, 0, -1 is based on associating +1 with (100), 0 with (010), and -1 with (001). For example, in FIG. 6 the two input triads, (a1, a2, a3) equals (1 0 0) and (b1, b2, b3) equals (0 1 0), represent the trinary digits +1, 0 respectively. 
     The (s) component optically cooperates with six additional components (w), (t), (w&#39;), (t&#39;) (m) and (o). Component (w) is shown in FIG. 7; (t) is shown in FIG. 8; (w&#39;) is shown in FIG. 9; (t&#39;) is shown in FIG. 10; (m) is shown in FIG. 13a and (o) is shown in FIG. 13b. All are used with (s) component to form the basic logic modules W, T, W&#39;, T&#39;, M and O respectively. 
     Referring to FIG. 7, component (w) is made up of a prism array 30 having prism elements or beam parts 30a-30i, spatially separated to align with the spacing of the optical bistable elements 20a-20i of a component (s). These pass the incoming beams d1-d9 to appropriate locations or parts 40a, 40b and 40c on a holograph element array or diffraction grating 40. The incoming beams d1-d9 are the same as beams c1-c9 leaving the bistable array 20 of an (s) component from elements 20a-20i. When a beam impinges on 40a, 40b or 40c transfer-and-weight digit beams are passed or generated therefrom and are designated e1, e2, and e3. 
     The preestablished angular orientation of the beams from elements or beam parts 30a-30i of prism array 30 to holographic element array 40 is unique to the (w) modular associated with module W. Each of the other components (t), (w&#39;) and (t&#39;), (m) and (o) have their own unique beam orientation structure. This is so to assure the generation of different logic functions associtated with logic modules W, T, W&#39;, T&#39;, M and O. 
     The trinary logic module W using components (s) and (w) together is shown in FIG. 11. The two input triads (a 1 ,a 2 ,a 3 ) and (b 1 ,b 2 ,b 3 ) give rise to one output triad (e 1 ,e 2 ,e 3 ). For the example illustrated in FIG. 11, the input triads (1 0 0) and (0 1 0) yield the output triad (0 0 1). In terms of trinary logic, the inputs +1 and 0 yield the output -1. The same spatial light modulation encoding scheme works for the other trinary logic elements T, W&#39; and T&#39;. For those logic element components (s) and (t) are used to create a T trinary logic element component (s) (w 1 ) for the W&#39; logic element and component (s) and component (t 1 ) for the T&#39; logic element. 
     In a component (w) optical beams d6 and d8 are directed onto an element 40a of the holographic element array and either assure an output beam e1. Optical beams d1, d3, d5, d7 and d9 are directed to the element 40b of the holographic element array and any assure an output beam e2. Beams d2, and d4 are directed to the element 40c either of which assure an output beam e3. The three positions correspond to the trinary digits +1, 0 and -1. Only one of the nine optical beams d1-d9 would be on with the remaining 8 off, so that only a single trinary digit would be indicated at the output logic element (w) at any one given time. 
     The steering of the beams from the elements or beam parts 50a-50i of prism array 50, to elements 60a-60c of array 60 of component, (t) accounts for the different logic functions attributed logic module T, see FIG. 8. An impinging beam on any one of the elements 60a-60c assures an e1, e2, or e3 beam. The different steering of the beams from the elements or beam parts 70a-70i of prism array 70 to the elements 70a-70c of holographic or diffraction grating element 80 in component (w&#39;) accounts for the different logic functions which is associated with logic module W&#39;, see FIG. 9. An impinging beam on any one of the elements 60a-60c assures e1, e2 or e3 beam. Steering of the beams from the parts 90a-90i of prism array 90 to the elements 100a-100c of its associated holographic or diffraction grating 100 in component (t&#39;) accounts for the logic functions associated with logic element T&#39;, see FIG. 10. An impinging beam on any of the elements 100a-100c assures an e1, e2 or e3 beam. 
     The steering of the beams to carry out these logic functions has been attribute to redirection of the beams by preestablished, discreetly configured prism arrays onto appropriately disposed holographic or diffraction element arrays. The proper structural elements are selected and properly placed to properly direct the beams by one skilled in the art to which this invention pertains. Fiber optics with or without couplers can be used to appropriately connect from locations corresponding to (a1 a2 a3) and (b1 b2 b3) to locations corresponding to the location of where beams (c1-c9) emanate. Fibers could also be used to channel beams from the c1-c9 beam locations, to d1-d9 beam locations. Optical fibers can be used to channel the d1-d9 beams from their discrete locations to where beams e1, e2, and e3 emanate from the components (w), (t) (w&#39;), (t&#39;), (m) and (o). The optical logic functions would not be impaired by substituting fibers in place of prisms and holographic arrays and may be desirable in some applications where such optical waveguides have demonstrated a recognized utility, such as in the highly satisfactory ducting of beams in certain microminiture applications. Such modifications are entirely within of the scope of this inventive concept, and become apparent to one skilled in the art to which this invention pertains. 
     MSD multiplication partially relies on the same algorithm employed for MSD addition, and subtraction. However, adder arrays AA are used repeatedly by summing partial products in tree structure, see FIG. 3. The explicit shifting of operands is avoided conforming more closely with the parallel pipeline flow of data inherent in MSD arithmetic. 
     Modified signed-digit multiplication between two operands x and y is accomplished by multiplying each trinary digit of the y operand by each trinary digit of the x operand forming the necessary partial products. This procedure has been demonstrated above so that the partial products may be summed in pairs, using the previous described MSD addition algorithm, with appropriate normalization performed by padding with zeros (0). 
     Generation of the partial product in an optical architecture can be implemented, by a partial product generator 120, see FIG. 15. It is fabricated from a number of appropriately connected partial product generator modules 120&#39; each made up of plurality of logic elements M appropriately coupled together to provide for parallel, simultaneous optical computations on the digits of operands x and y, see FIG. 16. 
     The optical bistable holographic and prismatic technology referred to above is applicable to the creation of two additional trinary logic modules denoted by M and O for handling the partial products and padded zero respectively. Module M has an (s) component and an (m) component, see FIG. 13a. Module O has an (s) component and an (o) component, see FIG. 13b. In the embodiment depicted in FIGS. 15 and 16, the logic elements O have been dispensed with although, it is envisioned for some operations that there inclusion may be warranted. Truth tables for the trinary logic elements M and O are set forth FIG. 12, (m) components of 140 beam as shown to parts 150a-150c of array 150 in FIG. 13a and O components of 160 and 170 beam as depicted as shown in FIG. 13b. 
     A completed M logic module as depicted FIG. 14 demonstrates an input triad module (a 1 ,a 2 ,a 3 )=(0 0 1) and input triad (b 1 ,b 2 ,b 3 )=(0 0 1) to yield an output signal triad (e 1 ,e 2 ,e 3 )=(1 0 0). Such an optically interconnected M module functions as a partial product generator module 120&#39;, in FIG. 16, as it receives the input triads representative of x and y trinary digits to provide for the partial products for subsequent adding operations. 
     An M logic element or module such as shown in FIG. 14 also can be used as an &#34;inverter&#34;, for arriving at the complement of a trinary number. When either the input triad (a1 a2 a3) or the input triad (b1 b2 b3) has values of (0 0 1) (-1) as one input then the other triad (either) (a1 a2 a3) or (b1 b2 b3) can function as the sole trinary input, so that the output at (e1 e2 e3) will be the complement of the inputed trinary bit. It must be remembered however, that an array of parallel M logic modules is optically coupled to receive only one of the trinary digit numbers, so that it may be subtracted. The other input bypasses the &#34;inverter&#34; modules. The M modules coupled as shown in FIG. 2c provide this &#34;complementing&#34; function. 
     The partial product generator module of FIG. 16, is depicted as showing the partial product of the operands (y 0 ) and (x 0 . . .x n )=(z 0 . . .z n ). This same module is duplicated as shown FIG. 15, to accommodate those operands (y 0 . . .y n ) and these (x 0 . . .x n ). The number of partial product generators is of course a function of the digit numbers in the operands and is capable of being duplicated to accommodate larger numbers. 
     Additions of the partial product continues by additional levels of adder array AA, until the root of the adder tree is reached, see FIG. 3. The adder tree shown is only two tiers of the adder array AA of FIG. 2b, with a partial product generator PPG120 of FIG. 16, because only two four trinary digits are being multiplied. This tree is correspondingly increased to have more adder arrays when higher order trinary numbers are multiplied. For example, two 8-digit multiplication would call for another tier and so on. 
     Obviously, many modifications and variations of the present invention are possible in the light of the above teachings. It is therefore to be understood that within the scope of the appended claims the invention may be practiced otherwise than as specifically described.