Do a system model in terms of: States, Inputs, Outputs, Next state (state transition) function, and Readout (output) function.
Define the states, inputs and outputs in terms of a description and as formal mathematical sets. Define next state function in terms of description and as a state transition diagram or a mathematical function or pseudo code, define time scale for your model.
Pattern Recognizer (using a state transition diagram) Consider a Pattern Recognizer that accepts single digit inputs (0 or a 1) each time unit and outputs a NO (as a 0) until the pattern 101101 has been in the stream of inputs then a YES (as a 1) will be output.
Consider a register that hold the last several digits received and shifts in a new digit when received and shifts out the oldest digit.