Numerical simulations representing pattern matching of a 4-bit search string: {1 1 0 1} within a 16-bit search space: {1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0}. Notice that the search string is programmed to repeat twice within the search space. Bit sequences are encoded in the NRZ-OOK format at a bit rate of 40 Gbps. Photodetector signals (D i ) correspond to the XNOR output of the i th - bit shifted search space and the search string, i ={0, 1, . . . N - 1}. The position of the first bit of the sequence (within the search space) that matches with the search string is given by: j =( Q - 1) * N -( i - 1), where Q is the segment number, Q ={1, 2, . . . M / N }, M and N are the length of the search space and search string respectively. The timing information of individual segments can be determined by utilizing a sub-harmonic clock (SHC), depicted with dashed blue lines. As seen, outputs D 0 , D 2 have a continuous high or `1’ level over the 4-bit duration of the search string in the 1st and 4th segments respectively (highlighted with hatched lines)—indicating that the search string is present in the search space at two different locations: the 1st and the 11th. Each coloured vertical segment highlights the period of the search string.