Finite-state machine (electronic)