Moore and melay circuits