0

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
    ........
Azad
  • 103
  • 1
  • 5
  • 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. – Chris Stratton Sep 10 '13 at 21:55
  • @ChrisStratton: Yes, I am doing the paper exercise, it's the designation of Synchronous Counter subject, unfortunately; we don't have a practical, we only study the theoretical way.

    After all, your comment were helpful, but didn't answered my question, sorry :)

    – Azad Sep 10 '13 at 22:02
  • 2
    Isn't it obvious that the "D" state variable is completely superfluous and should simply be eliminated? – Dave Tweed Sep 10 '13 at 22:06
  • 1
    @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. – Chris Stratton Sep 10 '13 at 22:09
  • @DaveTweed: No, since it's 2^4, it needs 4 state variables. – Azad Sep 10 '13 at 22:11
  • @ChrisStratton: Thanks, there is no requirement, it's only to be sure that I am not taking a wrong way of using one of the ways that I mentioned. – Azad Sep 10 '13 at 22:14
  • 2
    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. – Dave Tweed Sep 10 '13 at 22:16
  • @DaveTweed: if you notice the counter reaches number 14 in decimal which is (1110) in binary, so we have 4 bits, I am now confused about removing the D, it's right we didn't use it, but we need it in the state table. – Azad Sep 10 '13 at 22:22
  • 1
    The output for D needs to be zero, but it has no relevance as a state variable. – Dave Tweed Sep 11 '13 at 01:58

1 Answers1

2

If you perform a logic minimization analysis of the four state variables A, B, C, and D and take don't cares into consideration in the Karnough map groupings you will find that the D term minimizes away as the input to any of the state transfer equations. Also you will find that the logic equation for the drive of the Q(D) flop flop becomes:

Q(D) := 0

Michael Karas
  • 57,328
  • 3
  • 71
  • 138