Warning: mkdir() [
function.mkdir]: Permission denied in
/home/webs/affiliatelib2/CacheManager.php on line
12
Warning: mkdir() [
function.mkdir]: No such file or directory in
/home/webs/affiliatelib2/CacheManager.php on line
12
Warning: fopen(/home/templatecore2cache//*cluesnet.com/f0/f0702445226251c3c2f2bfd51195728f3fd82b14.tc2cache) [
function.fopen]: failed to open stream: No such file or directory in
/home/webs/affiliatelib2/CacheManager.php on line
130
Warning: fwrite(): supplied argument is not a valid stream resource in
/home/webs/affiliatelib2/CacheManager.php on line
131
Warning: fclose(): supplied argument is not a valid stream resource in
/home/webs/affiliatelib2/CacheManager.php on line
132
In general, a
counter is a device which stores (and sometimes displays) the number of times a particular
event (philosophy) or
Process (general) has occurred, often in relationship to a
clock signal. In practice, there are two types of counters:
- up counters which increase (increment) in value
- down counters which decrease (decrement) in value
Counters in electronics
In electronics, counters can be implemented quite easily using register-type circuits such as the
Flip-flop (electronics), and a wide variety of designs exist, e.g:
- Asynchronous (ripple) counters
- Synchronous counters
- Johnson counters
- Decade counters
- Up-Down counters
- Ring counters
Each is useful for different applications. Usually, counter circuits are
digital in nature, and count in
binary code, or sometimes binary coded decimal. Many types of counter circuit are available as digital building blocks, for example a number of chips in the 4000 series implement different counters.
Asynchronous (ripple) counters
The simplest counter circuit is a single Flip-flop (electronics)#D flip-flop, with its D (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), you will get another 1 bit counter that counts half as fast. Putting them together yields a two bit counter:
{] overall is. (To clarify this, a 1-bit counter is exactly equivalent to a divide by two circuit - the output frequency is exactly half that of the input when fed with a regular train of clock pulses).
Synchronous counters
Where a stable count value is important across several bits, which is the case in most counter systems, synchronous counters are used. These also use flip-flops, either the D-type or the more complex J-K type, but here, each stage is clocked simultaneously by a common clock signal.
Logic gates between each stage of the circuit control data flow from stage to stage so that the desired count behaviour is realised. Synchronous counters can be designed to count up or down, or both according to a direction input, and may be presettable via a set of parallel "jam" inputs. Most types of hardware-based counter are of this type.
Johnson counters
A Johnson counter is a special case of
shift register, where the output from the last stage is inverted and fed back as input to the first stage. A pattern of bits equal in length to the shift register thus circulates indefinitely. These counters are sometimes called "walking ring" counters, and find specialist applications, including those similar to the decade counter, digital to analogue conversion, etc.
Decade counters
Decade counters are a kind of counter that counts in tens rather than having a binary representation. Each output will go high in turn, starting over after ten outputs have occurred. This type of circuit finds applications in multiplexers and demultiplexers, or wherever a scanning type of behaviour is useful. Similar counters with different numbers of outputs are also common.
Up-Down Counters
It is a combination of up counter and down counter, counting in straight binary sequence. There is an up-down selector. If this value is kept high, counter increments binary value and if the value is low, then counter starts decrementing the count.
Ring Counters
A ring counter is a counter that counts up and when it reaches the last number that is designed to count up to, it will reset itself back to the first number. For example, a ring counter that is designed using 3 JK Flip Flops will count starting from 001 to 010 to 100 and back to 001. It will repeat itself in a 'Ring' shape and thus the name Ring Counter is given.
See also:
Frequency counter
Counters in computer science
In Computability theory (computation), a
counter is considered a type of memory. A counter stores a single natural number (initially 0 (number)) and can be arbitrarily many digits long. A counter is usually considered in conjunction with a finite state machine (FSM), which can perform the following operations on the counter:
- Check whether the counter is zero
- Increment the counter by one
- Decrement the counter by one (if it's already zero, this leaves it unchanged).
The following machines are listed in order of power, with each one being strictly more powerful than the one below it:
Deterministic or Non-deterministic FSM plus two counters
Non-deterministic FSM plus one Stack (data structure)
Non-deterministic FSM plus one counter
Deterministic FSM plus one counter
Deterministic or Non-deterministic FSM
For the first and last, it doesn't matter whether the FSM is deterministic or non-deterministic (see
Deterministic finite state machine). They have equivalent power. The first two and the last one are levels of the
Chomsky hierarchy.
The first machine, an FSM plus two counters, is equivalent in power to a Turing machine.
See the article on register machines for a proof.
Counters in the Internet
A web counter counts how many time a website or certain page has been viewed. They are usually accurate but some controversies have started regarding if they are accurate or not. This is usually because most counters count the number of unique hits a page gets while other count how many times a page was viewed even if the same person viewed it twice.
See also
- Time to digital converter
External Links
- Asynchronous counters
Free Counters - Over 1000 Web Counter Designes
Free Counters. Looking for a WebPage Graphical Hit counter or Tracker? then you have Definitely come to the right place as Simple As 123! For life with (as you can see) Very ...
Free Counter
Robust graphical counters for your Web Page with fun graphics, we even have an animated Bart Simpson counter with new designs on the way.
Beauty Counter Direct, Cosmetics, Skincare, Fragrance and Beauty ...
Beauty Counter Direct sell discounted designer beauty products, skincare, grooming, cosmetics and fragrances online. Quality customer service, fast UK delivery
Welcome - Calorie Counter
Lose weight through healthy eating and exercise. Support, diet tips and chat room.
Counter-terrorism strategy | Home Office - Security
The key aim of the counter-terrorism strategy is to reduce the risk from international terrorism so that people can go about their business freely and with confidence.
Calorie Counter
Popular Foods Calorie Counter. ... Complete your food diary every day, stay within your calorie allowance and you WILL lose weight
Free Counter
This is a Free Counters Server, you may have found your way here by mistake! If you want a Counter please follow the links provided below!
Counter Solutions Ltd
Developers of electronic point of sale systems particularly for the hospitality sector. Contact information and case studies.
Calorie Counter
Calorie counter. ... Calorie Counter - Count the Number of Calories for Any Food. Our calorie counter offers an easy way for you to determine and count the number of calories for ...
NHS Counter Fraud and Security Management Service -----
The NHS Counter Fraud and Security Management Service has responsibility for all policy and operational matters relating to the prevention, detection and investigation of fraud and ...