All optical frequency encoded logic gates NOT, OR and AND are proposed and described using polarization rotation in semiconductor optical ampli¯ers (SOAs). The switching power of the logic gates are very low and have capability to speed of 320 Gbps. The gates are easily integrable, simple in hardware and compatible to optical network. The input and output power requirement is included.