In digital logic and computing, a counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock.
Each pulse applied to the clock input increments or decrements the number in the counter.
Depending on the type of counter, the output may be a direct representation of the counts (a binary number), or it may be encoded.
Many counters provide additional input signals to facilitate dynamic control of the counting sequence, such as: Some counters provide a Terminal Count output which indicates that the next clock will cause overflow or underflow.
In synchronous counters, all flip-flops share a common clock and change state at the same time.
Each flip-flop introduces a delay from clock edge to output toggle, thus causing the counter bits to change at different times and producing a ripple effect as the counter input clock propagates through the chain.
This counter will increment (by toggling its output) once per clock cycle and will count from zero to one before overflowing (starting over at zero).
Ripple counters exhibit unstable output states while the input clock propagates through the circuit.
For example, the circuit shown to the right is an ascending (up-counting) four-bit synchronous counter implemented with JK flip-flops.
A decade counter may have each (that is, it may count in binary-coded decimal, as the 7490 integrated circuit did) or other binary encodings.
Typically, a pattern consisting of a single bit is circulated, so the state repeats every n clock cycles if n flip-flops are used.
A counter is usually considered in conjunction with a finite-state machine (FSM), which can perform the following operations on the counter: The following machines are listed in order of power, with each one being strictly more powerful than the one below it: For the first and last, it doesn't matter whether the FSM is a deterministic finite automaton or a nondeterministic finite automaton.
Images may be presented in a variety of fonts, or styles; the classic example is the wheels of an odometer.
Many automation systems use PC and laptops to monitor different parameters of machines and production data.
They typically consist of a series of disks mounted on an axle, with the digits zero through nine marked on their edge.
Electromechanical counters were used to accumulate totals in tabulating machines that pioneered the data processing industry.