Patent ID: 7869107

Claim:
An optical comparator circuit which has first and second input nodes operative to receive respective words A and B as optical digital signals, each word comprising an N-bit Boolean word received at the input as a sequence of bits starting with the most significant bit and ending with the least significant bit, each bit of word A operative to be received at the input at the same time as the corresponding bit of word B, the circuit comprising: a first stage comprising an optical gate having two inputs, operative to receive the optical signals at the two inputs and further operative to output an N-bit optical signal wherein each bit represents the logical expression A XOR B for a respective pair of bits of the words A and B; a second stage comprising an optical gate having at least two inputs, a first input operative to be connected to the output of the first stage by an optical connection having a first time delay, and successive inputs operative to be connected to the output of the first stage through (N−1) further optical connections, each further connection having a different, associated time delay which is longer than the first time delay, the second stage operative to provide at its output a signal comprising N bits, each bit corresponding to a respective bit of the signal output from the first stage at that time, and each bit having a first value if all of the inputs to the second stage at that time are equal and a second value if and only if the first input differs in value from all of the successive inputs, and a third stage comprising an optical gate having two inputs, the first input operative to be connected to the first input node of the comparator circuit and the second input operative to be connected to the output of the second stage, the third stage operative to output an N-bit signal with each bit having a first value if the inputs at that time differ and a second value if the inputs at that time are the same, the presence of the second value in the output being indicative of word A being greater than word B.