https://vlsiweb.com/moore-state-machine/