A Johnson counter, also known as a twisted ring counter or Möbius counter, is a type of digital counter circuit used in digital electronics and sequential logic. It is a modification of the standard ring counter that overcomes the problem of having an invalid state (all zeros) by "twisting" the ring structure.
A Johnson counter is constructed using a shift register with a feedback mechanism. The shift register is a cascade of flip-flops, with the output of the last flip-flop feeding back into the input of the first flip-flop to create a loop. The number of flip-flops in the shift register corresponds to the number of valid states the Johnson counter can achieve.
The shifting pattern of a Johnson counter is interesting because it progresses through a sequence of unique states without any invalid states. It creates a "twisted" loop that avoids the all-zero condition, which is typically undesired in regular ring counters.
For a Johnson counter with 'n' flip-flops, the shifting pattern follows a distinct sequence of 2^n states, where each state represents a unique binary pattern. The sequence is cyclic and non-repetitive until it returns to its initial state.
Let's illustrate this with a simple example of a 4-bit Johnson counter (n = 4) with flip-flops labeled as Q3, Q2, Q1, and Q0. Initially, all flip-flops are set to 0.
The shifting pattern for the 4-bit Johnson counter is as follows:
0000 (Initial state)
0001
0011
0111
1111
1110
1100
1000 (Returning to the initial state)
As you can see, the counter cycles through a sequence of unique binary patterns without ever having an all-zero state. The sequence length in this case is 2^4 = 16, and the counter goes through each state once before repeating.
The Johnson counter's ability to eliminate the invalid all-zero state makes it useful in applications where the counter's output is used as an address or control signal, ensuring that the counter doesn't get stuck in an undesirable state.