A Johnson counter, also known as a twisted-ring counter or a Möbius counter, is a type of digital counter used in digital electronics and sequential logic circuits. It is a modification of the standard ring counter, designed to produce a unique shifting pattern as it cycles through its states.
A standard ring counter is a circular shift register in which only one flip-flop is set to "1" while all others are set to "0". The "1" bit moves from one flip-flop to the next in each clock cycle. However, the problem with a standard ring counter is that it results in a repetitive sequence with no unique pattern.
To address this limitation, the Johnson counter uses a feedback mechanism to produce a non-repeating sequence, making it useful in applications like pseudo-random number generation, frequency division, and control unit design.
The unique shifting pattern of a Johnson counter is achieved by feeding back the output of one flip-flop to the input of the next flip-flop in the counter chain. This feedback loop creates a "twisted" or "Möbius" configuration, resulting in a sequence of states that has a unique pattern with no repeating values until all states have been cycled through.
For example, let's consider a 4-bit Johnson counter. The initial state can be set to any non-zero value, but let's take "0001" as an example:
0001
0010
0100
1000
1100
1110
1111
0111
After the 8th clock cycle, the counter returns to its initial state (0001), and the pattern will repeat. However, in between, there are 7 unique states, making the Johnson counter's shifting pattern distinct and useful for various applications.
The advantage of this unique shifting pattern is that it can be used in applications where a repetitive sequence is undesirable, or where a relatively long sequence with no repetition is needed. The number of unique states in a Johnson counter is equal to 2^n - 1, where n is the number of bits in the counter (in the example above, n=4, and 2^4 - 1 = 15 unique states).