The synthesis of sequential switching circuits