Physics/Option Modules/Electronics/Sequential Logic: Counters
Physics · Electronics · A2 Level

Sequential Logic: Counters

Every circuit so far has had no memory at all — feed it the same inputs and you always get the same output. A counter breaks that rule completely: its output depends on how many pulses it has already seen, which means, for the first time in this topic, the circuit needs to remember something.

9 min read

Sequential logic: circuits with memory

Every gate and gate-network covered so far in this topic has been combinational: its output is completely determined by its current inputs, with no dependence on anything that happened previously. A sequential logic circuit is different — its output depends on its current inputs and on its own internal stored state, built up from past inputs. In effect, it has memory.

A counter is the leading example of a sequential circuit in this course, and the focus of this lesson. A counter's essential job is to step through a repeating sequence of output states, advancing by one step every time it receives an input pulse. At any given moment, its output (read across its several output lines, or bits) represents — in some code — how many pulses it has counted since it was last reset. Ask a counter for its output twice in a row without anything else happening and you'll get the same answer both times, but that's only because no new pulse has arrived to change its stored state — feed it a pulse in between and the output changes, something no purely combinational circuit could ever do based on identical input conditions.

Standard counter control inputs

  • Clock. Each pulse on the clock input advances the count by one step. The clock is what actually drives the counting — no clock pulses, no change in output.
  • Reset. Activating the reset input returns the counter immediately to its starting (usually zero) state, regardless of what it was counting before.
  • Up/down control. Some counters support a control input that determines whether each clock pulse increments (counts up) or decrements (counts down) the stored count.

Three named counter types

Each of the counters named in this topic produces its output across several output lines (bits) that, taken together, represent the current count — but they differ in exactly what sequence those output lines step through.

Binary counter

A binary counter steps through the ordinary binary number sequence: 000, 001, 010, 011, 100, and so on, each output combination one greater (in binary) than the last. This is the most common and most directly "countable" type — the output bits, read as a binary number, give the count directly.

Clock pulses countedOutput (3 bits)
0000
1001
2010
3011
4100

BCD counter

A binary-coded decimal (BCD) counter counts from 0000 up to 1001 (decimal 0 to 9), then rolls straight back to 0000, rather than continuing on into binary values like 1010 or 1011 that don't correspond to a single decimal digit. This makes BCD counters useful whenever the count needs to drive a decimal digital display, since each group of four bits maps onto exactly one displayed digit.

Decimal countBCD output
81000
91001
0 (rolls over)0000

Johnson counter

A Johnson counter is structurally quite different from the other two — it's built from a shift-register structure, where the pattern of 1s and 0s already present shifts along the output lines by one position on every clock pulse, in a specific repeating ring pattern (with the signal fed back round from the last output to the first). Its output sequence does not represent a binary count at all. This makes it useful specifically where that repeating shifting pattern is itself the wanted behaviour — for example, sequencing a set of outputs on and off one at a time, one after another.

Building a modulo-n counter

A basic binary counter naturally counts through its full range before rolling over (a 3-bit counter counts 0 to 7 before returning to 0). A modulo-$n$ counter is one that counts only up to $n-1$ before resetting back to zero, rather than running through its full natural range. The standard technique for building one is to feed the counter's own output back into its own reset input, via a small decoding circuit that detects the moment the count reaches the value $n$ and immediately triggers a reset — so the counter never actually settles on the output value $n$ itself, jumping straight from $n-1$ back to 0.

Worked exampleDesigning a modulo-6 counter
01
Start with a standard 3-bit binary counter, which naturally counts 000 through 111 (decimal 0–7) before rolling over.
3 bits are needed since the target range, 0 to 5, requires representing up to the value 5 = 101 in binary.
02
A modulo-6 counter should count 0, 1, 2, 3, 4, 5, then reset back to 0 — so it must never remain at the output value 6 (binary 110).
The reset must be triggered the instant the count reaches 6, so the counter effectively skips straight from 5 back to 0.
03
Decode output value 6 (binary 110) using an AND gate connected to the two output bits that are 1 only when the count is 110 — here, the two most significant bits.
The decoding circuit's job is to output 1 for exactly one specific count value, and 0 for every other value — a small application of the truth-table-to-circuit method from the previous lesson.
04
Feed the decoding gate's output into the counter's reset input. As soon as the count reaches 110, the reset fires immediately, forcing the output straight back to 000 on the very next clock edge.
The counter's own output is being used to trigger its own reset — this feedback loop is what actually enforces the modulo-6 behaviour.
result
The core distinction: memory

A counter's next output depends on what it is currently counting — its stored state — not just on whatever is happening on its clock and reset pins at that instant. That dependence on stored history is exactly the "memory" behaviour that separates sequential logic from every gate circuit covered in the previous two lessons: no combination of AND, OR, NOT, NAND, NOR or EOR gates alone, however cleverly wired, can remember anything between one set of inputs and the next.

Key takeaways

  • Sequential logic circuits have outputs depending on stored past state as well as current inputs — unlike the combinational circuits covered in the previous two lessons.
  • A counter steps through a repeating output sequence, advancing one step per clock pulse, with its output representing the count since the last reset.
  • Standard counter control inputs: clock (advances the count), reset (returns to the starting state), and up/down (chooses increment or decrement direction, where supported).
  • A binary counter steps through the ordinary binary sequence (000, 001, 010, ...).
  • A BCD counter counts 0000–1001 (decimal 0–9) then rolls over, matching single decimal digits for driving displays.
  • A Johnson counter uses a shift-register ring structure, producing a repeating shifting pattern rather than a binary count — useful for sequencing outputs one at a time.
  • A modulo-$n$ counter is built by decoding the output value $n$ and feeding that decoded signal back into the counter's reset input.
  • The defining feature of sequential logic is memory: the next output depends on the currently stored state, not just the present inputs.