Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
OPTICAL CIRCUIT FOR COMPARING TWO N-BIT BINARY WORDS
Document Type and Number:
WIPO Patent Application WO/2009/015690
Kind Code:
A1
Abstract:
An optical comparator circuit comprises a first stage comprising an optical gate (10) which receives the signals (A and B) applied to the two inputs and produces at its output an N bit s i g n a l with e a c h bit being representative of the logical expression A XOR B for a respective pair of bit s of the words A and B, a second stage which comprises an optical gate (20) having at least two inputs, a first input being connected to the output of the first stage by a n optical connection having a first time delay, and a second input being connected to the output of the first stage through (N-I) further optical connections, each further connection having an associated time delay which is longer than the first time delay, the second stage providing at its output a signal comprising N bits, each bit corresponding to a respective bit of t he signal output from the first stage at that time, and each bit having a first value if all of the inputs to the stage at that time are equal and a second value if and only if the first input differs in value from all of the second inputs, and a third stage which comprises an optical gate (30, 40) having two inputs, the first input being connected to the first input node of the circuit and the second input being connected to the output of the second stage, the output of the third stage comprising 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.

Inventors:
BOGONI ANTONELLA (IT)
POTI LUCA (IT)
SCAFFARDI MIRCO (IT)
Application Number:
PCT/EP2007/057886
Publication Date:
February 05, 2009
Filing Date:
July 31, 2007
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ERICSSON TELEFON AB L M (SE)
International Classes:
G02F3/00; G02F1/35
Foreign References:
US4864524A1989-09-05
US20030058527A12003-03-27
US6462865B12002-10-08
JPH03216727A1991-09-24
US6275311B12001-08-14
Other References:
BERRETINI G ET AL: "Ultrafast Integrable XNOR, AND, NOR, and NOT Photonic Logic Gate", IEEE PHOTONICS TECHNOLOGY LETTERS, IEEE SERVICE CENTER, PISCATAWAY, NJ, US, vol. 18, no. 8, 15 April 2006 (2006-04-15), pages 917 - 919, XP002438053, ISSN: 1041-1135
Attorney, Agent or Firm:
STASIEWSKI, Piotr (MaplewoodChineham Business Park, P.O. Box 53, Basingstoke Hampshire RG24 8YB, GB)
Download PDF:
Claims:

CLAIMS

1. An optical comparator circuit which has first and second inputs nodes for receiving respective words A and B, 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 being 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 which receives the signals applied to the two inputs and produces at its output an N bit signal with each bit being representative of the logical expression A XOR B for a respective pair of bits of the words A and B, a second stage which comprises an optical gate having at least two inputs, a first input being connected to the output of the first stage by an optical connection having a first time delay, and a second input being connected to the output of the first stage through (N-I) further optical connections, each further connection having an associated time delay which is longer than the first time delay, the second stage providing 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 stage at that time are equal and a second value if and only if the first input differs in value from all of the second inputs, and a third stage which comprises an optical gate having two inputs, the first input being connected to the first input node of the circuit and the second input being connected to the output of the second stage, the output of the third stage comprising 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.

2. The optical circuit of claim 1 in which the first stage comprises an optical XOR gate, the second stage comprises an optical NAND gate, or an

optical AND gate preceded by a NOT gate at one of its inputs with the further delayed inputs being the ones that are inverted and the third stage comprises an optical AND gate.

3. The optical circuit of claim 2 in which the AND gate of the third stage is implemented as an XANDNOTY gate preceded by a NOT gate at the Y input, the input which recieves the output from the second stage being the one that is inverted.

4. The optical circuit of any preceding claim which includes means for applying the words A, B to the input nodes with each bit of the word arriving at a temporal spacing from the previous and subsequent bit of the word, the spacing being set by a clock pulse train.

5. The optical circuit of claim 4 in which the first delay time is approximately zero and each of the further delayed inputs to the second stage has a delay that is a unique multiple of the clock frequency plus the first delay.

6. The optical circuit of any preceding claim which includes a fourth stage which comprises a further AND gate having two inputs, the first input being connected to the second input node of the circuit and the second input being connected to the output of the second stage to provide at its output the function B>A.

7. The optical circuit of claim 6 which further includes a fifth stage which comprises an optical logical OR gate which receives as its input all of the N signal bits output from the third and fourth stage simultaneously and provides at its output a signal representing the function NOT(A=B).

8. The optical circuit of any preceding claim which comprises optical logic gates formed from a logical element comprising a SOA to which two

input signals, X and Y, to be processed are fed and which, through the exploitation of cross gain modulation effects provides as its output a signal representing the function (XANDNOTY).

9. The optical circuit of any preceding claim in which the AND gate of the third stage comprises one XANDNOTY gate and one NOT gate, with the signal fed to the Y input being inverted by passing it through a NOT gate to give the function XANDY, the NOT gate in turn comprising an XANDNOTY logic gate fed with only one input signal and a clock signal as the other input, the second stage comprises one XANDNOTY gate, the XOR gate of the first stage comprises two XANDNOTY gates whose outputs are simultaneously fed to an OR gate and the OR gate may simply comprise an optical fibre coupler.

10. The optical circuit of claim 8 or 9 in which each SOA logic gate comprise a two ended device with one of the input signals being applied to a first end and the other signal to its second end along with a counter wave signal CW, the output being taken from the first end of the device.

11. A method of performing a comparison of two N-bit optical signals A, B where N is greater than 1 , comprising performing the following steps:

(a) compare the most significant bit (MSB) of each word to produce an optical output signal having a first state indicating that the bits are the same and a second state indicting that the bits are different,

(b) pass the output from step (a) to a first input of an AND gate;

(c) pass the output from AND gate generated in step (b) to an input of a second AND gate at the same time as passing the bit of word A compared in step (a) to a second input of the AND gate; (d) repeating the process of step (a) for the next bit in the word.

(e) passing the output of step (d) to the first input of the first AND gate and the inverse of the output of original step (a) to a second input of the AND gate;

(f) passing the optical output of step (e) to the first input of the second AND gate along with the bit of word A used in comparison step (d) to its second input; and

(g) analysing the optical signal output of the second AND gate for each of the bits to identify whether A>B.

12. The method of claim 11 which further comprises additional steps of (g) repeating steps (d), (e) and (f) for all bits of the N-bit word until the LSB of A and B are compared, the steps being repeated N-I times.

13. The method of claim 11 or 12 which comprises an additional step of passing each output of the first AND gate to a first input of a third AND gate which receives at its other input the corresponding bit of word B compared in corresponding step (a).

14. The method of claim 13 which further comprises passing all of the N outputs from each of the second and third AND gates to an OR gate, the output of which provides a signal representing the function NOT(A=B).

15. An all optical comparator which is arranged to compare two N-bit words, N being greater than 1 , and provide as an output at least one of the following Boolean functions: A>B,A<B and NOT(A=B), in which the comparator comprises a plurality of logic elements which each comprise at least one semiconductor optical amplifier.

16. An all optical comparator according to claim 15 in which each semiconductor optical amplifier is configured so that when supplied with two input signals, X and Y, through the exploitation of cross gain

modulation effects -XGM- it provides as its output a signal representing the function (XANDNOTY).

Description:

OPTICAL CIRCUIT FOR COMPARING TWO N-BIT BINARY

WORDS

BACKGROUND TO THE INVENTION

This invention relates to improvements in optical circuits and in particular to an N-bit optical comparator for comparing two N-bit binary words. The comparator is especially suitable for use as a building block in a larger optical circuit, such as an all optical telecommunications switch.

N-bit comparators compare two N-bit binary words A and B, where N is greater than 1 , and provide as an output at least one of the Boolean functions: A<B, A>B and at least one of NOT(A=B) and A=B. A fully functioned comparator will provide all of these signals as its three outputs. Each signal may take the form of a one bit Boolean signal indicating whether the logical/Boolean function represented by the signal is true of false (e.g. A<B is true or A>B is false). The values true and false can be coded 1 and 0 respectively.

Traditionally comparators for use in high performance computing systems and communications networks have been constructed using discrete digital electronic circuits, with the two words A and B comprising electronic signals and the outputs also comprising electronic signals. A four bit Boolean word can be expressed as a sequence of four binary digits. The circuit can be constructed using a wide variety of small electronic logic circuits, so called "logic gates" which embody Boolean functions such as AND, OR, and NOT. More complex Boolean expressions such as XOR and NAND can be constructed by combining the simpler gates into larger circuits. As the field of digital logic is well established these gates are available at very low costs making the circuits highly economical to produce.

A limitation with digital electronics arises when they are required to process signals at very high speeds. Whilst the logic gates can change state quickly they cannot meet the high speed demands required from modern telecommunications equipment. Whereas telecommunications once only transmitted low bandwidth voice data, it is now required to transmit video information which requires much greater bandwidth. Electronic devices are reaching fundamental limits at these high bandwidths in terms of their power consumption, wiring density and throughput.

Recent trends have seen computing systems and communications with ultra high bandwidths, approaching 160 GB per second or more, being implemented by transmitting the information as optical signals, typically in the form of packets of information, across the network. To take full advantage of the bandwidth, a need has arisen to extract and process information embedded in the signals, such as packet routing information, wholly in the optical domain. This has led the applicant to appreciate that there is a need to develop new and innovative optical logic circuits for use in these systems, including optical comparators.

One known solution to the problem of providing an all optical N-bit comparator for use at ultra-high bandwidths is known from the paper presented by J.M.Martinez et al in the journal IEEE Photonics Technology Letters, Vol.18 (2006), No. l , pp.151-153. This teaches a cascade of SOA- MZI structures. With this approach there is a requirement for N SOA-MZI structures for comparing two N-bit numbers. Optical amplifiers are currently not as low cost to produce as their electronic counterparts, so this need for N structures can result in a relatively high cost circuit when the numbers have many bits (N greater than 6 or so).

An alternative prior art solution is taught in a paper presented by T.Yasui et al in the journal IEEE Journal of Lightwave Technology, VoI 24 (2006), No

2, pp.723-733. This paper teaches a solution which exploits differential spin excitation in semiconductor multiple quantum wells.

An object of the invention is to provide a comparator which uses all optical components and which can have an architecture that can readily be scaled to cope with N bit numbers having a relatively high number of bits (N greater than 4 or so) without a significant associated cost or complexity increase.

SUMMARY OF THE INVENTION

According to a first aspect there is provided an optical comparator circuit which has first and second inputs nodes for receiving respective words A and B, 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 being 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 which receives the signals applied to the two inputs and produces at its output an N bit signal with each bit being representative of the logical expression A XOR B for a respective pair of bits of the words A and B, a second stage which comprises an optical gate having at least two inputs, a first input being connected to the output of the first stage by an optical connection having a first time delay, and a second input being connected to the output of the first stage through (N-I) further optical connections, each further connection having an associated time delay which is longer than the first time delay, the second stage providing 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 stage at that time are equal and a second value if and only if the first delayed input differs in value from all of the other delayed inputs, and

a third stage which comprises an optical gate having two inputs, the first input being connected to the first input node of the circuit and the second input being connected to the output of the second stage, the output of the third stage comprising 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.

The optical circuit will compare two N-bit numbers and provide an output from the third stage which indicative of the function A>B and may easily be scaled by varying the number of further delayed input optical paths to the second stage.

The first stage may comprise an optical XOR gate.

The second stage may comprise an optical XANDNOTY gate or an optical AND gate preceded by a NOT gate at one of its inputs. In the case of the XANDNOTY gate, the first signal may be the Y input. In the case of an AND gate, the further delayed inputs may be the ones that are inverted and the first input may be non-inverted.

The third stage may comprise an optical AND gate, or more preferably an XANDNOTY gate preceded by a NOT gate at the Y input. The input which recieves the output from the second stage is preferably the one that is inverted.

The skilled man will understand that by optical logic gate we mean a logic gate which takes optical input signals and produces an optical output signal without converting the optical signal into an electronic signal as an intermediate step. This feature enables the circuit to operate at very high bit rates.

The circuit may include means for applying the words A, B to the input nodes with each bit of the word arriving at a temporal spacing from the previous and subsequent bit of the word, the spacing being equal to the difference between the first and second time delays. This spacing may be set by a clock pulse train which can be applied to all of the optical gates for synchronisation.

The first delay time is preferably zero seconds, or as short a delay as possible. All optical connections have some associated time delay so a zero delay in practice may be impossible to achieve.

Each of the further delayed inputs to the second stage may have a delay that is a unique multiple of the clock frequency plus the first delay. Hence if the first delay is zero, the further delays will be multiples of the clock frequency. Thus, for N=4, there will be 3 further delay lines fed to the second stage, with a delay time equal to one clock beat, two clock beats and three clock beats respectively. The circuit will produce 4 output signals from the third stage as the input words A and B ripple through.

In a modification, the input words may arrive with a bit spacing of 2 clock beats, and the further delays will be multiples of 2 clock beats. This allows a spare beat between each output of the AND gate, giving the gate time to reset. Longer spaces could be used, but excessively long spaces will reduce the maximum bandwidth that can be provided by the circuit.

The circuit may include a fourth stage which comprises a further AND gate having two inputs, the first input being connected to the second input node of the circuit and the second input being connected to the output of the second stage. This will provide at its output the function B>A.

The circuit may further include a fifth stage which comprises an optical logical OR gate which receives as its input all of the N signal bits output

from the third and fourth stage simultaneously and provides at its output a signal representing the function NOT(A=B). Of course, if required this function could be obtained directly by monitoring the output of the second stage.

The inputs to the second stage gate may be fed from optical connections having time delays chosen so that the bit of the word present at the input node that is fed to the NAND gate is the same bit as that passed through the first and second stages to produce the output of the second stage that is also fed to the third stage.

The delayed further inputs to the second stage AND gate may each be inverted whilst the first input to that gate is not inverted.

The optical circuit may comprise optical logic gates formed from a logical element comprising a SOA to which two input signals, X and Y, to be processed are fed and which, through the exploitation of cross gain modulation effects -XGM- provides as its output a signal representing the function (XANDNOTY). This gate is preferably configured so as to provide each of the different types of Boolean functions required by the circuit.

The AND gate of the third stage can be implemented using one XANDNOTY gate with the signal fed to the Y input being inverted by passing it through a NOT gate to give the function XANDY. The NOT gate of the third stage can also be performed from the same SOA building block XANDNOTY but fed with only one input signal an a clock signal as the other input. The XOR gate of the first stage can be implemented using two XANDNOTY gates whose outputs are simultaneously fed to an OR gate. The OR gate may simply comprise an optical fibre coupler. The complete circuit may therefore comprises 6 XANDNOTY gates.

The SOA may comprise a two ended device with one of the input signals being applied to a first end and the other signal to its second end along with a counter wave signal CW, the output being taken from the first end of the device. The input signal applied with the counter wave signal may have a lower power than the other input signal. The high power signal should have enough power to saturate the SOA when in its logical high state, but not in its low state.

The first, second and third and fourth stages may consist in total of only six identical optical logic gates connected by optical connections to give the different required functions and a number of optical delay lines, the logic gates each consisting of only a single SOA, rather than multiple SOAs. Each logic gate may be identical to the other logic gates. This makes the circuit well suited to implementation as an integrated circuit.

According to a second aspect there is provided a method of performing a comparison of two N-bit optical signals A, B where N is greater than 1 , comprising performing the following steps:

(a) compare the most significant bit (MSB) of each word to produce an optical output signal having a first state indicating that the bits are the same and a second state indicting that the bits are different,

(b) pass the output from step (a) to a first input of an AND gate;

(c) pass the output from AND gate generated in step (b) to an input of a second AND gate at the same time as passing the bit of word A compared in step (a) to a second input of the AND gate;

(d) repeating the process of step (a) for the next bit in the word.

(e) passing the output of step (d) to the first input of the first AND gate and the inverse of the output of original step (a) to a second input of the AND gate; (f) passing the optical output of step (e) to the first input of the second AND gate along with the bit of word A used in comparison step (d) to its second input;

and

(g) analysing the optical signal output of the second AND gate for each of the bits to identify whether A>B.

The method may further comprise additional steps of

(g) repeating steps (d), (e) and (f) for all bits of the N-bit word until the LSB of A and B are compared. This allows words of greater than 2 bits in length to be compared (N>2). The step steps may be repeated N-I times.

The method may comprise an additional step of passing each output of the first AND gate to a first input of a third AND gate which receives at its other input the corresponding bit of word B compared in corresponding step (a). This step provides as its output a signal indicative of B>A. Again this step may be repeated N times, once for each bit of words A and B that are compared.

The method may further comprise passing all of the N outputs from each of the second and third AND gates to an OR gate, the output of which provides a signal representing the function NOT(A=B).

According to a third aspect there is provided an all optical comparator which is arranged to compare two N-bit words and provide as an output at least one of the following Boolean functions: A>B,A<B and NOT(A=B), in which the comparator comprises a plurality of logic elements which each comprise at least one semiconductor optical amplifier.

The semiconductor optical amplifier which two input signals, X and Y, to be processed are fed and which, through the exploitation of cross gain modulation effects -XGM- provides as its output a signal representing the function (XANDNOTY).

The comparator may include 6 such logic elements.

The comparator may compare word of length N>1.

LIST OF FIGURES

There will now be described by way of example only one embodiment of the present invention with reference to and as illustrated in the accompanying drawings of which:

Figure 1 is an overview of an optical logical comparator for comparing two N-bit words, where N is greater than 1 ;

Figure 2 is a schematic illustration of an optical gate that can be used as a building block to implement the comparator of Figure 1 ;

Figure 3 is a detailed view of an embodiment of an optical circuit in accordance with the first aspect of the invention which functions in accordance with the overview of Figure 1 ;

Figure 4 is a truth table for the logic gate of Figure 2;

Figure 5 illustrates a representative set of output patterns obtained from the circuit of Figure 3 together with the input words A and B used; and

Figure 6 plots BER against received peak power for A>B and A<B compared with the BER of the inputs A and B,

BRIEF DESCRIPTION OF THE INVENTION

An all optical N-bit comparator is shown in Figure 1. The comparator receives as its input a pair of N-bit words Ak and Bk where k=l ...N. The comparator comprises a combination of optical logic gates and delay lines

which together provide as an output the logical functions A>B, A<B and NOT(A=B).

The first stage of the optical circuit is an XOR gate 10 to which each pair of corresponding bits Ak, Bk of the signals A, B are passed in sequence. By this we mean that at a first instance the most significant bits A n and B n are input to the comparator to give a first output bit, then the next most significant bits A n-1 , B n _i to give the next output bit and so on until the least significant bits Ak=i, Bk=i are passed to the XOR gate to give the last bit of the output. There will therefore be an N bit word produced with one bit being produced at any given time.

If two bits Ak, Bk passed to the XOR gate 10 are the same, then the output bit of the XOR gate that corresponds to those bits will be logic 0. It will be logic 1 if, and only if, the bits A and B are different. For any given pair of N bit words there will therefore be a corresponding N bit word produced with a 1 for each pair of bits that do not match and a 0 for each pair that do match. It should be noted that this output word does not provide any information indicative of which of the words A, B is largest.

The next stage of the comparator circuit is an AND gate 20, which is provided with 2 inputs supplied from an N-bit serial to parallel converter 21. The serial to parallel converter 21 in fact comprises merely a set of N optical connections, the first of which has zero introduced time delay, and the others have time delays which are different multiples of the time between samples arriving at the XOR gate. Coils of optical fibre could be used to provide the required time delays. The delays are typically sequential integer multiples of the clock rate. Hence with a clock giving 1 nsecond between beats, and for words of length N=6 the first line will have multiple M=O times the clock rate, the next M=I times and so on until the Nth line has a delay equal to M=N-I nseconds.

The first input to the AND gate 20 is connected to the output of the XOR gate through the zero delay time optical connection of the SPC 21. The second input is also connected to the output of the XOR gate but this time through a set of N-I inverters 22 respectively associated with each of the N-I delayed time lines of the serial to parallel converter 21. The signals to the second input are therefore delayed and inverted versions of the signals out of the XOR gate 10.

Thus, as the first output bit of the XOR gate is produced it is passed to the first input of the AND gate. At this time no signals are applied to the other inputs to the AND gate (since there are no previous delayed signals to be presented) so the output of the AND gate will be 0. As the next bit is output from the XOR gate it is applied to the first input to the AND gate, and by this time the first bit will have rippled through to the second input of the AND gate. Because one of the inputs is inverted and the other not, the output of the AND gate will be 1 if the two inputs to the AND gate do not match (being the first input 1) and 0 if they do. This process is then repeated for each of the N bits of the words A and B, giving an N bit output signal from the AND gate. Note that as soon as one pair of inputs to the AND gate do not match then the output of the AND gate for all subsequent samples will always be 0 for the rest of that word.

To determine whether A>B, each output from the AND gate of the second stage is next passed to a third stage. This comprises a second AND gate 30. The k th bit of word A is fed to one input of the AND gate along with the k th bit output from the second stage. If the k th bit of A is 1 , and the k th output of the first AND gate is 1 , then this indicates that A>B. If they do not match, then A is either equal to B or less than B.

To determine whether A<B, each output from the AND gate is also coupled to a fourth stage which also comprises an AND gate 40. This time it is the k th bit of B which will be fed to one input of the AND gate along with the

k th output from the second stage. If the k th bit of B is 1, and the output of the fourth stage is 1 , then this indicates that A<B. If they do not match, then A is either equal to B or greater than B.

Having determined both A<B and A>B the outputs of the third and fourth stages can then be coupled to a fifth stage comprising an OR gate 50 to determine whether A=B. In this case, all of the bits of the words output from the third and fourth stages should be fed to the OR gate simultaneously. This may require a series to parallel converter 51 ,52 as shown for each of the outputs from the third and fourth stages. This may again comprise a set of N-I delay lines and one not-delayed line. In practice all of the lines can be delayed as long as the difference in delay for each line is correct. Alternatively, this function could be obtained by directly monitoring the output of the second stage. This later alternative is the one illustrated in Figure 3.

Note that in place of the various AND gates, a gate performing the function XANDNOTY can be used if the Y input is previously inverted. As will be shown, such a gate can also be used as a building block for producing the XOR gate and the NOT gates.

A practical embodiment of the comparator of Figure 1 can be realised using a set of 6 semiconductor optical amplifiers (SOA' s) configured to provide logical building blocks or logic gates. A suitable gate which provides the functionality (XANDNOTY) is shown in Figure 2.

Each building block for a gate comprises a single semiconductor optical amplifier (SOA) having a first input at one end and a second input at the other. The output from the amplifier is taken to be the signal that passes out of the second end of the amplifier. A characteristic of SOA's is that a gain is applied to an input signal which is influenced by the power of the signals input to the amplifier. As the input power increases the gain eventually

starts to decrease. A further characteristic is that SOA' s are non- linear devices, a signal at one wavelength being able to modulate a signal at another or at the same wavelength through the well known process of cross gain modulation (XGM).

Coupled to the first end of the amplifier is a continuous wave signal CW of relatively high power and a first, lower power, input signal Lp. Coupled to the second end is a second, high power, input signal Hp. The two input signals have the same wavelength but the CW is at a different wavelength.

The two counterpropogating input signals interact in the SOA so that the low power signal Lp experiences the gain modulation induced by the stronger second input signal HP. The CW signal helps to keep the SOA saturation high, thus reducing the SOA recovery time. In effect this means that with no high power signal applied (Hp=O) the output will be 1 when Lp=I and 0 when Lp=O. On the other hand, when the high power signal Hp=I is applied, the low power signal Lp experiences a strongly reduced SOA gain, giving an output of 0 at all times. The output from the gate therefore corresponds to the function (Lp AND NOT Hp). This is shown in the truth table of Figure 4 of the accompanying drawings.

Turning to Figure 3, six gates as shown in Figure 2 can be connected into a circuit which takes the two N-bit numbers as its input and provides outputs for A>B, A<B and NOT(A=B). The gates can be identical which eases the design burden.

The first part of the circuit of Figure 1- the XOR gate- is implemented by passing signals A and B to the first and second inputs of a first gate (gate 1) to give an output corresponding to the logical function (AANDNOT B). The same signals are also fed the other way round (to the second and first inputs respectively) to a second gate (gate 2) to give an output corresponding to the function (BANDNOT A). The output of the two gates

are then combined using a fibre coupler tail (to give an OR function) so as to provide the function (AANDNOT B)OR(BANDNOT A) which is the same as the function (AXORB).

The output of the fibre coupler tail is next fed to the first input of a third gate (gate 3) and a delayed version of the same output fed to the second input of the third gate. In fact, for an N-bit word there will be N delayed versions fed to the second input, each delayed by one or more samples. Only one delayed input is shown in Figure 3 for clarity. The output of the third gate will therefore represent the first AND gate function of the circuit of Figure 1. Note that no additional inverters are needed in this case since the function of gate 3 inherently provides the required inversion of the second input.

The output from gate 3 is then passed to the second input of another gate, gate 4. A pulse train synchronised to the sample rate is fed to the first input of gate 4, so that the output of gate 4 is an inverted version of the signal fed to the second input of gate 4 (it is an inverted version of the signal out of gate 3).

The signal output from gate 4 is fed to the second input of gates 5 and 6 respectively. The first input of gate 5 is provided with An as its input and thus this gate gives as its output an indication of A>B. The first input of gate 6 is provided with Bn as its input and thus this gate gives as its output an indication of A<B.

The output from each gate can be passed though an amplifier as required before being fed to a subsequent gate, and may also be passed through a bandpass filter.

In an experimental arrangement to verify the operation of the circuit of Figure 3, N bit signals A and B of wavelength 1556.55nm were used with a

continuous wave signal applied to each SOA of 1540nm. Bandpass filters of 0.6nm bandwidth were used to filter the outputs from each gate.

Figure 5 shows the output patterns NOT(A=B), A>B and A<B together with the corresponding input patterns B and A. The guard bit between two patterns is labelled as g. When A and B are matched, the output is 00 at all three outputs. If A is higher than B, the outputs A>B and NOT(A=B) become 1 as the first mismatch occurs. The other bit is 0. The same correct behaviour is observed also for A<B, thus demonstrating the scheme works properly.

Figure 6 summarises the performance in terms of BER as a function of the received peak power for the input and output signals. The measurements were performed with a pre-amplified receiver. Error-free operations are obtained for NOT(A=B), A>B and A<B.

The measured extinction ratio is higher than 8 dB for NOT(A=B), 8.6dB for A>B and 8.4dB for A<B. Since extinction ratio for the input patterns A and B is 9.9dB, the maximum penalty introduced by the 2-bit comparator is 1.9dB for NOT(A=B), 1.3dB for A>B and 1.5dB for A<B.