We experimentally demonstrate all-optical flip-flop and inverter operations using two adjacent lasing wavelengths in a quantum-well microring laser, and that the state is switched between the flip-flop and inverter operations by changing the phase in the outer cavity composed of busline waveguides. We also propose multimodal rate equations for a microring laser taking into account clockwise and counter-clockwise light propagations. By comparing experimental results and simulated results based on the rate equations, the principle of the switching between the flipflop and inverter operations is clarified.