We show that an index-and gain-guided vertical-cavity surface-emitting
laser with a square-shaped active region can operate as a bistable la
ser with the two Gauss-Hermite modes TEM lo and TEM,,. Optical switchi
ng from one mode to the other upon injection of appropriate Gaussian p
ulses is numerically investigated; the switching energy can be as smal
l as 30 fJ and the process is completed in a time of the order of a fe
w nanoseconds. We demonstrate the possibility of using the laser as a
logic gate of the NOR, OR, NOT type. Carrier diffusion increases laser
threshold and the size of the bistability domain, and it reduces both
switching time and switching energy.