An up-down counter selects whether its next count increases or decreases. A modulo-N counter repeats after N states. A BCD counter is a familiar modulo-10 example, usually representing decimal zero through nine with four bits. Boundary behavior must be part of the next-state specification.

Worked example

For a modulo-6 up-counter, the valid sequence is 000, 001, 010, 011, 100, 101, then 000. States 110 and 111 are outside the intended cycle. Define a recovery action for them rather than assuming they can never appear.

What to watch for

Counting down from zero needs an explicit wrap or saturation rule. A reset value and illegal-state recovery are separate design decisions.

Try it yourself

How many bits are needed to encode a modulo-10 counter's ten states?

Answer: Four, because three bits provide only eight combinations, while four provide sixteen. Six combinations remain outside the normal decimal cycle.

How to study this topic

Define the reset state and update rule before tracing a sequence. List several successive states by hand and check the wraparound. Bit direction, enable behavior and illegal-state handling are part of the specification.

Explore related programmes

These recorded programmes are upcoming. This article is general educational content, not a syllabus or course sample.

Digital Electronics