# Where to put the unused states in synchronous counter that counts Even numbers?

Suppose if we have a counter that counts only Even numbers and the unused states(odd numbers) treated as don't-care condition.

Current state           Next State
A  B  C  D              A  B  C  D
0  0  0  0              0  0  1  0
0  0  1  0              0  1  0  0
0  1  0  0              1  0  0  0
1  0  0  0              1  0  1  0
1  0  1  0              1  1  1  0
1  1  1  0              0  0  0  0

0  0  0  1              x  x  x  x
0  0  1  1              x  x  x  x
0  1  0  1              x  x  x  x
0  1  1  1              x  x  x  x
1  0  0  1              x  x  x  x
1  0  1  1              x  x  x  x
1  1  0  1              x  x  x  x
1  1  1  1              x  x  x  x


Above; I put the all unused states at the end.

Does this a right way? OR I must put them as normally as it's, like :

   Current state            Next State
A  B  C  D              A  B  C  D
0  0  0  0              0  0  1  0
0  0  0  1              x  x  x  x
0  0  1  0              0  1  0  0
........

• Since it's the values which encode the operations, not the order on paper it wouldn't typically matter. However, if you are doing a paper exercise in grouping like terms (such as in a Karnough map) you may for purposes of that need to list them in order; but a grey code order rather than a binary value one. Of course if you have a class assignment or something else with style guidelines, that could impose requirements as well. Sep 10, 2013 at 21:55
• Isn't it obvious that the "D" state variable is completely superfluous and should simply be eliminated? Sep 10, 2013 at 22:06
• @Azad - the answer is that it doesn't matter, unless there's a requirement you haven't told us about which would make it matter - I tried to explain a few possibilities along those lines. Sep 10, 2013 at 22:09
• What's 2^4??? You only have 8 valid states, which is only 2^3. The "D" state variable is always 0, so you might as well eliminate it and tie it to ground instead. Sep 10, 2013 at 22:16
• The output for D needs to be zero, but it has no relevance as a state variable. Sep 11, 2013 at 1:58