Fig. 5 Output State Chart