In order to realize the optical readwrite-control and optical logic judgement,an optical monostable flip-flop based on the semiconductor optical amplifier(SOA) dual-loop structure lasing at different wavelengths is presented.The flip-flop has two states:steady state and unsteady state.The flip-flop has an extinction ratio of 35 dB,switching time of only 1-2 ring cavity cycle and a large wavelength range of control light.The reduction of the length of the SOA ring lasers will greatly cut down the switching time,which makes the monostable flip-flop be the logic and control unit in optical buffer.