1. Apparatus for receiving electrical input potentials representing respectively the values of components of weighted digital input data, and for providing analog optical output approximately proportional to the sum of the weighted digital values in the input data, comprising an electrooptic waveguide, a plurality of adjacent electrooptic diffractive means, each responsive to a separate component of the digital input data and comprising a first electrode and a second electrode on the waveguide for temporarily changing the index of refraction, when different electrical potentials are present thereon, and thus forming a Bragg grating therein positioned with a direction of Bragg incidence approximately in the same predetermined input direction and with a direction of Bragg diffraction approximately in the same predetermined output direction, light input means for directing light of known or controlled intensity to enter into each diffractive means approximately in the predetermined input direction, and means for providing an electrical potential to each electrode in each diffractive means, such that the difference between the potential at the first electrode and the potential at the second electrode is substantially zero for each diffractive means responsive to a component of the digital input data having the value of zero, and the difference between the potential at the first electrode and the potential at the second electrode for each diffractive means responsive to a component of the digital input data having a value greater than zero is such as to form a Bragg grating that diffracts in the predetermined output direction a portion of the input light having an intensity approximately proportional to the weighted value of that component of the digital input data, the components of the digital input data being weighted, as in binary computation, proportionally to successive integral powers of two, and comprising an additional electrooptic diffractive means located to receive the light travelling beyond each of the plurality of first-mentioned diffractive means, and responsive also to electrical input potentials representing values of analog input data; the additional diffractive means comprising a third electrode and a fourth electrode on the waveguide for temporarily changing the index of refraction, when different electrical potentials are present thereon, and thus forming a Bragg grating therein positioned with a direction of Bragg incidence approximately in the predetermined output direction of the plurality of first-mentioned diffractive means and with a direction of Bragg diffraction approximately in a predetermined different output direction; and means for providing one electrical potential to the third electrode and another electrical potential to the fourth electrode, and thereby to direct in the different output direction light having a total intensity that is approximately proportional to the product of the value represented by the digital input data multiplied by the value represented by the analog input data.