Finite state machines: flip-flop
T flip-flop:
q T q+ z D
State: 1 bit (q) 0 0 0 0 0
Input: 1 bit (T) 0 1 1 0 1
Output: current state (z) 1 0 1 1 1
1 1 0 1 0
In state 0: In state 1:
input 0 gives new state 0 (hold) input 0 gives new state 1 (hold)
input 1 gives new state 1 (toggle) input 1 gives new state 0 (toggle)
Note that we can implement either type of flip-flop with the other type
and some combinational circuit