Finite State Machine Explained | Mealy Machine and Moore Machine | What is State Diagram ?