Optical logic using electrically connected quantum well PIN diode modulators and detectors