FACTOID # 64: Sri Lanka has lowest divorce rate in the world - and the highest rate of female suicide.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Counters

This article is about the term counter used in electronics and computing. For other meanings of counter, see counter (disambiguation) The term counter can have the following meanings: An electronic device - see counter. ...


In general, 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. In practice, there are two types of counters: There are many kinds of events. ... Process (lat. ... A clock (from the Latin cloca, bell) is an instrument for measuring time. ...

  • up counters which increase (increment) in value
  • down counters which decrease (decrement) in value

Contents


Counters in electronics

In electronics, counters can be implemented quite easily using register-type circuits such as the flip-flop, and a wide variety of designs exist, e.g: Electronics is the study and use of electrical devices that operate by controlling the flow of electrons or other electrically charged particles in devices such as thermionic valves and semiconductors. ... This article is about the electronic component. ...

  • Asynchronous (ripple) counters
  • Synchronous counters
  • Johnson counters
  • Decade counters

Each is useful for different applications. Usually, counter circuits are digital in nature, and count in binary, 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. A digital system is one that uses discrete values rather than a continuous spectrum of values: compare analog. ... The term binary code can mean several different things: There are a variety of different methods of coding numbers or symbols into strings of bits, including fixed-length binary numbers, prefix codes such as Huffman codes, and other coding techniques including arithmetic coding. ... Binary-coded decimal (BCD) is a numeral system used in computing and in electronics systems. ... The 4000 series is the general classification used to refer to the industry standard integrated circuits which implement a variety of logic functions using CMOS technology. ...


The simplest counter circuit is a single D-type 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. By cascading a series of D-type flip flops, a ripple counter is formed, which can count to 2n-1 where n is the number of bits (flip flop stages) in the counter. Ripple counters suffer from unstable outputs as the overflows "ripple" from stage to stage, but they do find frequent application as dividers for clock signals, where the instantaneous count is unimportant, but the division ratio 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). In algebra, a ratio is the relationship between two quantities. ...

A 4-bit synchronous counter
A 4-bit synchronous counter

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. Download high resolution version (1712x943, 21 KB) Wikipedia does not have an article with this exact name. ... Download high resolution version (1712x943, 21 KB) Wikipedia does not have an article with this exact name. ... A logic gate is an arrangement of switches used to calculate operations in Boolean algebra. ...


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. The term multiplexer has uses in several fields of application: Electronics In electronics, a multiplexer or mux is a device that combines several electrical signals into a single signal. ...


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. In digital circuits a shift register is a group of registers set up in a linear fashion which have their inputs and outputs connected together in such a way that the data is shifted down the line when the circuit is activated. ...


See also: Frequency counter A frequency counter is an electronic instrument, or component of one, that is used for measuring frequency. ...


Counters in computer science

In computability theory, a counter is considered a type of memory. A counter stores a single natural number (initially zero) 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: Computability theory is that part of the theory of computation dealing with which problems are solvable by algorithms (equivalently, by Turing machines), with various restrictions and extensions. ... Natural number can mean either a positive integer (1, 2, 3, 4, ...) or a non-negative integer (0, 1, 2, 3, 4, ...). Natural numbers have two main purposes: they can be used for counting (there are 3 apples on the table), or they can be used for ordering (this is... 0 (zero) or nought is both a number and a numeral. ... A bignum package in a computer or program allows internal representation of arbitrarily large integers, rational numbers, decimal numbers, or floating-point numbers, and provides a set of arithmetic operations on such numbers. ... Fig. ...

  • 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)

Power

The following machines are listed in order of power, with each one being strictly more powerful than the one below it:

  1. Deterministic or Non-deterministic FSM plus two counters
  2. Non-deterministic FSM plus one stack
  3. Non-deterministic FSM plus one counter
  4. Deterministic FSM plus one counter
  5. Deterministic or Non-deterministic FSM

For the first and last, it doesn't matter whether the FSM is deterministic or non-deterministic (see determinism). They have equivalent power. The first two and the last one are levels of the Chomsky hierarchy. A stack is a data structure that works on the principle of Last In First Out (LIFO). ... Determinism is the philosophical conception which claims that every physical event, including human cognition and action, is causally determined by an unbroken chain of prior occurrences. ... The Chomsky hierarchy is a containment hierarchy of classes of formal grammars that generate formal languages. ...


The first machine, an FSM plus two counters, is equivalent in power to a Turing machine. This equivalence can be shown in three steps. First, a Turing machine can be simulated by two stacks. Then, a stack can be simulated by two counters. Finally, four counters can be simulated by two counters. The Turing machine is an abstract machine introduced in 1936 by Alan Turing to give a mathematically precise definition of algorithm or mechanical procedure. As such it is still widely used in theoretical computer science, especially in complexity theory and the theory of computation. ...


Step 1: A Turing machine can be simulated by two stacks.

A Turing machine consists of an FSM and an infinite tape, initially filled with zeros, upon which the machine can write ones and zeros. At any time, the read/write head of the machine points to one cell on the tape. This tape can be conceptually cut in half at that point. Each half of the tape can be treated as a stack, where the top is the cell nearest the read/write head, and the bottom is some distance away from the head, with all zeros on the tape beyond the bottom. Accordingly, a Turing machine can be simulated by an FSM plus two stacks. Moving the head left or right is equivalent to popping a bit from one stack and pushing it onto the other. Writing is equivalent to changing the bit before pushing it. A stack is a data structure that works on the principle of Last In First Out (LIFO). ...


Step 2: A stack can be simulated by two counters.

A stack containing zeros and ones can be simulated by two counters, when the bits on the stack are thought of as representing a binary number, with the top being the least significant bit. Pushing a zero onto the stack is equivalent to doubling the number. Pushing a one is equivalent to doubling and adding 1. Popping is equivalent to dividing by 2, where the remainder is the bit that was popped. Two counters can simulate this stack, in which one of the counters holds a number whose binary representation represents the bits on the stack, and the other counter is used as a scratchpad. To double the number in the first counter, the FSM can initialize the second counter to zero, then repeatedly decrement the first counter once and increment the second counter twice. This continues until the first counter reaches zero. At that point, the second counter will hold the doubled number. Halving is performed by decrementing one counter twice and increment the other once, and repeating until the first counter reaches zero. The remainder can be determined by whether it reached zero after an even or an odd number of tries. In mathematics, the result of the division of two integers usually cannot be expressed with an integer quotient, unless a remainder —an amount left over— is also acknowledged. ... In mathematics, any integer (whole number) is either even or odd. ...


Step 3: Four counters can be simulated by two counters.

As before, one of the counters is used as scratchpad. The other, real counter holds an integer whose prime factorization is 2a3b5c7d. The exponents a, b, c, and d can be thought of as four virtual counters that are being simulated. If the real counter is set to zero then incremented once, that is equivalent to setting all the virtual counters to zero. If the real counter is doubled, that is equivalent to incrementing a, and if it's halved, that's equivalent to decrementing a. By a similar procedure, it can be multiplied or divided by 3, which is equivalent to incrementing or decrementing b. Similarly, c and d can be incremented or decremented. To check if a virtual counter such as c is equal to zero, just divide the real counter by 5, see what the remainder is, then multiply by 5 and add back the remainder. That leaves the real counter unchanged. The remainder will have been nonzero if and only if c was zero. The integers consist of the positive natural numbers (1, 2, 3, …), their negatives (−1, −2, −3, ...) and the number zero. ... In mathematics, a prime number (or prime) is a natural number greater than one whose only positive divisors are one and itself. ... This article is about the mathematical concept. ...


As a result, an FSM with two counters can simulate four counters, which are in turn simulating two stacks, which are simulating a Turing machine. Therefore, an FSM plus two counters is at least as powerful as a Turing machine. A Turing machine can easily simulate an FSM with two counters, therefore the two machines have equivalent power.


  Results from FactBites:
 
BoingDragon's Lair | Counters (5484 words)
The main problem with the counter logging right now is that it isn't resolving IP addresses, which kills the 'top 20 visitor domains' part of the reporting (the older counters had this, and I'm trying to maintain all of the same reporting features).
Some of the old counters will no longer be available in their current form, as I'm switching most of the 'overlay' ones (fairy, unicorn, etc) back to optimized inline images.
The counters are going to be limited to 2000 hits/day at first, so it really counts as a beta test for how much the system can handle.
WWW Homepage Access Counter and Clock (9310 words)
The implication is, if the counter is the first thing in a large table, the browser will not have to wait to calculate the width and height of the counter image before loading the rest.
The parameter offset is used with parameter align to specify the offset of the counter image in pixels from the edge of the base image while compositing the counter/clock image with an base image.
You can position the counter image anywhere on the base image using the parameter xy or you can use align to align at top, middle and bottom of the base image.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.