Johnson counters are another variation of ring counters, where the output of the last flip-flop is inverted and fed back to the input of the first one. This creates a twisted loop of flip-flops, where two adjacent flip-flops are active at a time. The active flip-flops shift from one position to the next with each clock pulse, creating a zigzag pattern of binary signals. For example, a four-bit Johnson counter can produce the following sequence: 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000, and so on.
Johnson counters have some benefits over ring counters. One is that they can count up to twice the number of flip-flops in the loop, which is equal to the number of bits. Another benefit is that they can be reset to zero easily, by applying a reset signal to all the flip-flops. However, Johnson counters also have some drawbacks. One is that they are more complex, because they require an inverter and a reset circuit. Another drawback is that they can generate unwanted spikes or transients in the output, because two flip-flops are switching state at a time.