 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 signal. == electronic counters == in electronics, counters can be implemented quite easily using register-type circuits such as the flip-flop, and a wide variety of classifications exist: * asynchronous (ripple) counter â changing state bits are used as clocks to subsequent state flip-flops * synchronous counter â all state bits change under control of a single clock * decade counter â counts through ten states per stage * up/down counter â counts both up and down, under command of a control input * ring counter â formed by a shift register with feedback connection in a ring * johnson counter â a twisted ring counter * cascaded counter * modulus counter. each is useful for different applications. usually, counter circuits are digital in nature, and count in natural binary. many types of counter circuits are available as digital building blocks, for example a number of chips in the 4000 series implement different counters. occasionally there are advantages to using a counting sequence other than the natural binary sequenceâsuch as the binary coded decimal counter, a linear feedback shift register counter, or a gray-code counter. counters are useful for digital clocks and timers, and in oven timers, vcr clocks, etc.. === asynchronous (ripple) counter ===  an asynchronous (ripple) counter is a single d-type flip-flop, with its j (data) input fed from its own inverted output. this circuit can store one bit, and hence can count from zero to one before it overflows (starts over from 0). this counter will increment once for every clock cycle and takes two clock cycles to overflow, so every cycle it will alternate between a transition from 0 to 1 and a transition from 1 to 0. notice that this creates a new clock with a 50% duty cycle at exactly half the frequency of the input clock. if this output is then used as the clock signal for a similarly arranged d flip-flop (remembering to invert the output to the input), one will get another 1 bit counter that counts half as fast. putting them together yields a two-bit counter: {| class="wikitable" style="text-align:center" |- ! cycle !! q1 !! q0
Digital_circuits Numeral_systems