In this paper, a novel optical comparison operation for phase-shift keying (PSK) modulated signal has been proposed by using optical delayed interferometer to realize an advanced functional component for future optical network. The feasibility of the optical comparators designed for 4-bit and 6-bit codewords was experimentally demonstrated. It has been shown that the constellations obtained from each comparator are located in conformity with a H amming distance between a comparator code and a given codeword, which is comprised of a successive two and three QPSK-modulated RZ symbols at 10.72 Gbaud/s. It was concluded that the proposed scheme offers a comparison operation for 4-bit and 6-bit codewords at 10 Gbaud/s.