Mealy type circuit