4-bit Johnson counter
It is designed with a group of flip-flops, where the inverted output from the last flip-flop is connected to the input of the first flip-flop. This counter is known as the Johnson Counter. Generally, the Johnson counter is implemented by using JK flip-flops.
A Johnson counter is a modified ring counter in which the output from the last flip-flop is inverted and fed back as an input to the first. So, it is also called a Twisted Ring Counter. It follows the sequence of bit patterns. When compared to the ring counter, it uses only half of the number of flip-flops.
4-bit Johnson counter:
The 4-bit Johnson counter contains 4 JK flip-flops and it counts 8 cycles. The inverted output of the last flip-flop is fed back as input to the first flip-flop.
i. The input value of the first ‘JK’ flip-flop is the inverted output of the last ‘JK ‘flip-flop.
ii. The ‘CLK‘ is used to count the states or cycles of the counter, which is in the closed loop.
iii. The reset pin is used as an on/off switch.
iv. As the data will be rotating around a continuous closed loop, a counter can also be used to detect various patterns or values within the data.
From the truth table, one can observe that for a 4-bit shift counter, there are 8 states. In general, an n-flip-flop shift counter will result in 2n states or a Modulo-2n counter.