A two-bit all-optical digital comparator using single mode Fabry-Perot laser diodes (SMFP-LDs) at an input data rate of 10 Gbps is proposed and demonstrated. All-optical comparator is demonstrated using cascaded logic units which are based on injection locking, multi-input injection locking and supporting beam principles for suppressing the dominant mode of SMFP-LDs. Digital comparators are the key components for the decision making circuits, the integral part of the arithmetic and logical units of optical data processors. The output performance of the proposed all-optical comparator is verified with output waveform, rising-falling time, output eye diagram, and bit error rate (BER) at 10 Gbps input Non Return to Zero (NRZ) PRBS of 2(31) - 1signal. The rising/falling time of about 47 ps, clear output waveforms, and clear output eye diagram with an extinction ratio of about 12 dB are obtained. A maximum power penalty of 1.3 dB is measured at a BER of 10(-9).