Skip to content
BetterDL

Partial state decoding

Also called: partial decode, partially decoded state, partial counter decoding

Detecting a counter state using only some of its bits, which works when no other state the counter actually visits has those same bit values.

Full state decoding uses every bit of the counter. But a mod n counter never visits some codes, and those unused states act like don't-cares for the decoder. So you can often leave bits out.

The test is simple: the reduced decoder must be 1 in the target state and 0 in every other state the counter really visits. Codes it never reaches don't count.

  • In a BCD counter (0 to 9), only 8 and 9 have Q3 = 1, and only 9 also has Q0 = 1. So state 9 is detected by instead of .
  • In a mod-12 counter with an asynchronous clear that detects 12 = 1100, the states reached are 0 to 12. Only 12 has Q3 = Q2 = 1, so a 2-input NAND does the job.

It's exactly K-map simplification with don't-cares: the unused codes let you make a bigger group. Partial decoding saves gate inputs, which is why it's common in mod-N clear logic.

Q3Q2\Q1Q000011110
00
0m0
0m1
0m3
0m2
01
0m4
0m5
0m7
0m6
11
Xm12
Xm13
Xm15
Xm14
10
0m8
1m9
Xm11
Xm10

Worked examples

Example

Mod-12 with a synchronous clear

A mod-12 counter with a synchronous clear must detect 11 = 1011. The visited states are 0 to 11. How many bits does the detector need?

  1. 1.

    Try : also 1 at 9 = 1001, which is visited. ✗

  2. 2.

    Try : also 1 at 10 = 1010. ✗

  3. 3.

    Try : 1 at 1011 and 1111, but 15 is never visited. ✓

  4. 4.

    So three inputs are enough; can be dropped.

Example

Reading the K-map

The K-map above is the detector for state 9 of a BCD counter, with codes 10 to 15 as don't-cares.

  1. 1.

    The 1 is at cell 9.

  2. 2.

    Grouping it with don't-cares 11, 13 and 15 gives a quad where Q3 = 1 and Q0 = 1.

  3. 3.

    Detector: .

Common mistakes

  • Checking only the states near the target. The reduced decoder must be 0 in every visited state.

  • Partially decoding a full binary counter. With no unused codes, every bit is needed.

  • Forgetting the brief state N in an asynchronous-clear design: it is reached, so it must be included when you check.

Practice Partial state decoding

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Partial state decoding is taught in Counters.