In this Letter, an all-optical logic sequence generator based on two different polarization holographic gratings has been proposed and demonstrated, which has one input port and four output ports. The polarization state of input light signal determines logic output signals. It can produce four kinds