You are designing a sequence detector to find the overlapping pattern "1011" in a serial data stream. What is the minimum number of states required if you implement this as a Moore machine versus a Mealy machine?
A sequence detector for a pattern of length N implemented as a Moore machine requires N+1 states because the output is dependent only on the current state, requiring a dedicated final state to assert the output. A Mealy machine requires exactly N states, as its output depends on both the current state and the current input, allowing the output to be asserted on the transition back to a previous overlapping state. Thus, for a 4-bit sequence, Moore needs 5 states, Mealy needs 4.