8. (10 points) We need to design a counter that has a range of count values from 1 to 5,
but it counts by either 1 or by 2 depending on the value of an input signal, X. So if X=0
then the counter will count by 1 (wrapping from 5 back to 1), and if X=1 then the
counter will count by 2, wrapping appropriately (i.e., it will go from 4 to 1, or from 5 to
2). Create the truth table for the logic that would be needed to calculate the next count
value, and then determine the equations for this logic.