Electronic – 4017 IC block diagram

cd4017counter

I am really confused with the block diagram of 4017 IC. Here's the dataheet.

I really can't wrap my head around the way they have taken the output for each count. They are just taking two flip to choose the state. Shouldn't they take all four?

The outputs of flip-flops go through the AND gate (NAND+NOT).Let's take the count of 3 for illustration here. For this, the counter should have 0011 (Q4-Q3-Q2-Q1) in the flip-flops. In the block diagram, they have chosen only Q4' and Q3. This means the LED connected to count three should light up when the Q4 is low and Q3 is high ie. (01XX). But that't not what the flip-flops are holding.

Also there are 4 cases where the Q4 is low and Q3 is high. Counts of 4,5,6,7 have their 4th bit 0 and 3rd bit 1.

What is going on exactly inside the counter? You may take any count for the illustration.

I have attached the portion of datasheet for convenience:

enter image description here

Here's a decade counter that I have studied:

![enter image description here

Cropped by Irfanview ^Y then copied ^C and pasted here ^V

Best Answer

The FFs are not counting in binary, they're a Johnson (twisted ring) counter. This has the advantage that any given state can be decoded using a 2-input gate, which is exactly why they did it this way. Adding one extra FF is simpler than creating ten 4-input gates. And also, the outputs are guaranteed to be glitch-free, since only one FF changes state at a time. The ten output gates detect which FF is about to change state, by comparing input to output.