notesonly.in

One notebook for every subject — open it anywhere.

Log in

Counters and Shift Registers: Working and Types Explained

Digital systems constantly count events and move data: a clock counts seconds, a frequency meter counts pulses, a serial port shifts bits out one at a time. Counters and shift registers are the sequential circuits for these two jobs, both made by wiring flip-flops in clever patterns.

A counter cycles through binary states, advancing one step per clock pulse. A shift register moves stored bits one position per clock, ideal for converting between serial and parallel data. Together they handle timing, sequencing, and data movement in every digital device.

Key Concepts

  • Ripple (asynchronous) counter: each flip-flop is clocked by the previous one's output. Simple, but the rippling delay causes brief wrong values called glitches.
  • Synchronous counter: all flip-flops share one clock and change together; faster and glitch-free, with extra gating logic.
  • MOD number: distinct states per cycle; a MOD-10 (decade) counter counts 0 to 9.
  • Up/down counter: direction chosen by a control input; handy for countdown timers.
  • SISO, SIPO, PISO, PIPO: shift register modes covering every serial/parallel entry-exit combination.
  • Ring counter: output fed back to input, circulating one 1 through n flip-flops for n timing phases.
  • Johnson counter: feeds back the inverted output, giving 2n states from n flip-flops.
  • Maximum count: n flip-flops give 2n states, so 4 bits count 0 to 15.

Formulas

  • MOD of n-bit counter: MOD = 2n, counting 0 to 2n − 1.
  • Frequency division: fout = fclock / 2n at the last ripple stage.
  • Johnson states: 2n from n flip-flops; ring gives n.
  • State after k pulses: a MOD-m counter from 0 shows k mod m.

Worked Example

A 3-bit ripple up-counter starts at 000. What is its state after 10 clock pulses?

  1. 3 bits means MOD-8: states 000 through 111, then rollover. 10 mod 8 = 2.
  2. Two steps from 000: 001, then 010. The counter shows 010 (decimal 2); it rolled over once and advanced two more.

Common Misconceptions

  • Ripple counters are glitch-free. The opposite: ripple delay briefly shows wrong states that can falsely trigger watchers. Synchronous counters avoid this.
  • More flip-flops means faster counting. More bits mean a larger range, not more speed; in ripple counters extra stages actually slow the maximum clock.
  • Shifting destroys the data. SISO marches bits out, but ring and Johnson counters feed output back so patterns circulate, and parallel-out modes read without disturbance.

Real-World Applications

  • Digital clocks divide a crystal frequency down to one-second ticks with counters.
  • UART serial ports use shift registers to convert bytes to bit streams and back.
  • LED chasers and multiplexed displays sequence outputs with ring and Johnson counters.
  • Radios and function generators step frequencies down with counter chains.

To recap: counters advance one state per clock with MOD = 2n, and shift registers slide bits in four serial/parallel combinations. Ripple counters are simple but glitchy, synchronous ones are clean, and ring variants make elegant timing sequencers.