I'm trying to understand how can one build a circuit that does the following functionality: [![enter image description here][1]][1] I see according to the output that I should have a D-FF, that works at Falling-Edge mode, so I need to add an inverter to the CLK. how can I continue from here? are there basic rules that I can follow in order to know what should I add more? Note: my intention is to use D-FF in the circuit. I have knowledge in designing mealy machines and aware of the procedure. but here the states aren't quiet clear in order to make mealy machine design. I would like to know if this could be a successful approach for the problem. the reason I thought about mealy machine is because the output change is dependent of the input change. [1]: https://i.sstatic.net/86R4n.png