A-Level Comp Sci Finite State Machine