A Johnson counter, also known as a rotary or ring counter, is a digital sequential circuit used for counting and generating a cyclic sequence of binary states. It is a modification of the standard binary counter, where instead of counting in a binary sequence (00, 01, 10, 11), it produces a continuous circular sequence of unique states. A Johnson counter can have 2^n states, where 'n' is the number of flip-flops used in the counter.
A Johnson counter consists of a series of flip-flops connected in a ring, where the output of one flip-flop is connected to the input of the next one, forming a loop. The last flip-flop's output is connected to the input of the first flip-flop, completing the ring.
The shifting pattern of a Johnson counter is as follows:
Initialization: Initially, all the flip-flops are reset to zero, which means all the outputs are 0 (low).
Counting Sequence: On each clock pulse, the Johnson counter shifts its state to the next state in the cyclic sequence. The shift pattern of the Johnson counter is unique and follows a "one-hot" pattern, meaning only one flip-flop's output is high (1) while all others are low (0) at any given time.
For example, let's consider a 4-bit Johnson counter, where 'n' is 4. It will have 2^4 = 16 unique states.
The shifting pattern for this 4-bit Johnson counter is as follows:
Q3 Q2 Q1 Q0
0 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0
1 0 0 1
0 1 0 1
0 0 1 1
1 0 1 0
1 1 0 0
1 1 0 1
1 0 1 1
0 1 1 1
1 1 1 0
1 1 1 1
0 1 1 0
0 0 1 0
As you can see, the Johnson counter goes through a cyclic sequence of 16 unique states, and only one bit changes between each state, which creates the "one-hot" pattern.
Johnson counters find applications in various fields, such as control systems, digital clocks, and pattern generation.