The heart of the DFA is its state register, which has flip-flops to store the binary representation of the current state number. Since there are four states, 2 flip-flops are needed. A 4x2 encoder is shown exposed at the top, feeding into the state register, which gets a new value only when CK goes high. It is this CK wire which is tied directly to the computer clock. Notice that wire 0 is not hooked to any of the inputs going into the OR gates because to write a 0 into the state register, none of the wires should have a 1 on it. In fact, the 0 wire is redundant and could be omitted. A 2x4 decoder takes the output of the state register and sets one wire to 1. Thus, each state has its own unique wire. |