Electrooptical logic operations using a two-electrode distributed-feedback (DFB) laser at a 1.3-μm wavelength are reported. A complete set of AND, NAND, OR, NOR, and INVERT logic gates have been demonstrated. They are based on detecting the output light of one of the two degenerate modes that were switched by electrical signals applied to the two electrodes. These high-speed wavelength switching and logic operations are of potential interest for future lightwave technologies. Also, the device is compatible with high-bandwidth single-mode optical fiber transmission systems.