Note that this is very similar to Fig. 5.17 in the textbook but uses a T flip-flop rather than a D flip-
flop.
Fig: 1