a method and circuitry for detecting a pattern in received data such as the a1a2 boundary in a sonet frame after deserialization . two consecutive pluralities of bytes of incoming data are stored and compared with the a1 and a2 values until the boundary is detected . the data are then bit shifted so that every byte on the bus is either a2 or a1 . a new aligned data bus is then formed such that the last a1 bit occurs on the data bus for a given clock cycle and the first a2 bit occurs on the data bus during the next clock cycle .