In digital logic and computing, a counter is a device which stores the number of times a particular event or process has occurred in relationship to a clock signal. The most common type is a sequential digital logic circuit with an input line called the clock and multiple output lines; the values on the output lines represent a number in the BCD number system. Each pulse decrements the number in the counter. A counter circuit is constructed of a number of flip-flops connected in cascade. Counters are a widely used component in digital circuits, are manufactured as separate integrated circuits and incorporated as parts of larger integrated circuits. In electronics, counters can be implemented quite using register-type circuits such as the flip-flop, a wide variety of classified into: Asynchronous 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. Counter circuits are digital in nature, count in natural binary. Many types of counter circuits are available as digital building blocks, for example a number of chips in the 4500 series implement different counters. 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, in oven timers, VCR clocks, etc. An asynchronous counter is a single d-type flip-flop, with its J input fed from its own inverted output; this circuit can store one bit, hence can count from zero to one before it overflows. 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 half the frequency of the input clock.
If this output is used as the clock signal for a arranged D flip-flop, one will get another 1 bit counter that counts half as fast. Putting them together yields a two-bit counter: You can continue to add additional flip-flops, always inverting the output to its own input, using the output from the previous flip-flop as the clock signal; the result is called a ripple counter, which can count to 2n - 1 where n is the number of bits 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; the use of flip-flop outputs as clocks leads to timing skew between the count data bits, making this ripple technique incompatible with normal synchronous circuit design styles. In synchronous counters, the clock inputs of all the flip-flops are connected together and are triggered by the input pulses. Thus, all the flip-flops change state simultaneously.
The circuit below is a 4-bit synchronous counter. The J and K inputs of FF0 are connected to HIGH. FF1 has its J and K inputs connected to the output of FF0, the J and K inputs of FF2 are connected to the output of an AND gate, fed by the outputs of FF0 and FF1. A simple way of implementing the logic for each bit of an ascending counter is for each bit to toggle when all of the less significant bits are at a logic high state. For example, bit 1 toggles. Synchronous counters can be implemented with hardware finite-state machines, which are more complex but allow for smoother, more stable transitions. A decade counter is one, rather than binary. A decade counter may have other binary encodings. "A decade counter is a binary counter, designed to count to 1010. An ordinary four-stage counter can be modified to a decade counter by adding a NAND gate as in the schematic to the right. Notice that FF2 and FF4 provide the inputs to the NAND gate; the NAND gate outputs are connected to the CLR input of each of the FFs."
A decade counter is one, rather than binary. It counts from 0 to 9 and resets to zero; the counter output can be set to zero by pulsing the reset line low. The count increments on each clock pulse until it reaches 1001; when it increments to 1010 both inputs of the NAND gate go high. The result is that the NAND output goes low, resets the counter to zero. D going low can be a CARRY OUT signal. A ring counter is a circular shift register, initiated such that only one of its flip-flops is the state one while others are in their zero states. A ring counter is a shift register with the output of the last one connected to the i
A tally counter is a mechanical, electronic, or software device used to incrementally count something fleeting. One of the most common things tally counters are used for is counting people, animals, or things that are coming and going from some location. A tally counter is cased in metal and is cylindrical in shape. Part of the circle contains a window of plastic or glass. Inside the counter are a number of rings with the numbers from 0 to 9 in descending order going clockwise. Most counters have four such rings, allowing the user to count up to 9999. A metal ring may be attached to aid in holding the counter, half the ring is bent to allow it to fold flush with the counter when not in use; the counter is activated by pressing a button located above the screen. This causes the first ring to advance one number. After the count has reached 0009 the second ring will advance one click and the first ring will come back to zero displaying 0010. To reset the counter, a knob is located on the side; this knob turns all the rings.
When the number displayed reaches the number on the remaining rings they will turn too, until the display is reset back to 0000. Electronic tally counters are available, which use an LCD screen to display the count, a button to advance the count; some have a button to decrement the count, for example if a mistake is made, or if counting a majority. The main application of tally counters is as people counters. At concerts, etc. A person will stand by the door with a tally counter recording the number of people. At amusement parks, the rides can only hold a certain number of people, so the operator may use a tally counter to keep track of the number of people who get on the ride, they are used for traffic analysis, scientific research, counting inventory and on industrial lines as well. Tally counters have been used in religion to count prayers replacing traditional prayer beads. Shri Vidya initiates use them to keep track of the number of repetitions of the Mula Mantra into which they are initiated.
Sikhs may use them to keep track of the number of times. Buddhists have been known to use them to count mantras. Gaudiya Vaishnava Hindus may use tally counters to keep track of the number of times that they chant the Hare Krishna Mahamantra. Initiated devotees are required to chant a certain number of'rounds' each day, each round consisting of 108 repetitions. Mechanical counter Row counter
Zhang Heng romanized as Chang Heng, was a Han Chinese polymath from Nanyang who lived during the Han dynasty. Educated in the capital cities of Luoyang and Chang'an, he achieved success as an astronomer, scientist, inventor, cartographer, poet and literary scholar. Zhang Heng began his career as a minor civil servant in Nanyang, he became Chief Astronomer, Prefect of the Majors for Official Carriages, Palace Attendant at the imperial court. His uncompromising stance on historical and calendrical issues led to his becoming a controversial figure, preventing him from rising to the status of Grand Historian, his political rivalry with the palace eunuchs during the reign of Emperor Shun led to his decision to retire from the central court to serve as an administrator of Hejian in Hebei. Zhang returned home to Nanyang for a short time, before being recalled to serve in the capital once more in 138, he died there a year in 139. Zhang applied his extensive knowledge of gears in several of his inventions.
He invented the world's first water-powered armillary sphere to assist astronomical observation. He improved previous Chinese calculations for pi. In addition to documenting about 2,500 stars in his extensive star catalog, Zhang posited theories about the Moon and its relationship to the Sun: he discussed the Moon's sphericity, its illumination by reflected sunlight on one side and the hidden nature of the other, the nature of solar and lunar eclipses, his fu and shi poetry were renowned in his time and studied and analyzed by Chinese writers. Zhang received many posthumous honors for his ingenuity. Born in the town of Xi'e in Nanyang Commandery, Zhang Heng came from a distinguished but not affluent family, his grandfather Zhang Kan had been governor of a commandery and one of the leaders who supported the restoration of the Han by Emperor Guangwu, following the death of the usurping Wang Mang of the Xin. When he was ten, Zhang's father died, leaving him in the care of his grandmother. An accomplished writer in his youth, Zhang left home in the year 95 to pursue his studies in the capitals of Chang'an and Luoyang.
While traveling to Luoyang, Zhang passed by a hot spring near Mount Li and dedicated one of his earliest fu poems to it. This work, entitled "Fu on the Hot Springs", describes the throngs of people attending the hot springs, which became famous as the "Huaqing Hot Springs", a favorite retreat of imperial concubine Yang Guifei during the Tang dynasty. After studying for some years at Luoyang's Taixue, he was well-versed in the classics and friends with several notable persons, including the mathematician and calligrapher Cui Yuan, the official and philosophical commentator Ma Rong, the philosopher Wang Fu. Government authorities offered Zhang appointments to several offices, including a position as one of the Imperial Secretaries, yet he acted modestly and declined. At age twenty-three, he returned home with the title "Officer of Merit in Nanyang", serving as the master of documents under the administration of Governor Bao De; as he was charged with composing inscriptions and dirges for the governor, he gained experience in writing official documents.
As Officer of Merit in the commandery, he was responsible for local appointments to office and recommendations to the capital of nominees for higher office. He spent much of his time composing rhapsodies on the capital cities; when Bao De was recalled to the capital in 111 to serve as a minister of finance, Zhang continued his literary work at home in Xi'e. Zhang Heng began his studies in astronomy at the age of thirty and began publishing his works on astronomy and mathematics. In 112, Zhang was summoned to the court of Emperor An, who had heard of his expertise in mathematics; when he was nominated to serve at the capital, Zhang was escorted by carriage—a symbol of his official status—to Luoyang, where he became a court gentleman working for the Imperial Secretariat. He was promoted to Chief Astronomer for the court, serving his first term from 115–120 under Emperor An and his second under the succeeding emperor from 126–132; as Chief Astronomer, Zhang was a subordinate of the Minister of Ceremonies, one of Nine Ministers ranked just below the Three Excellencies.
In addition to recording heavenly observations and portents, preparing the calendar, reporting which days were auspicious and which ill-omened, Zhang was in charge of an advanced literacy test for all candidates to the Imperial Secretariat and the Censorate, both of whose members were required to know at least 9,000 characters and all major writing styles. Under Emperor An, Zhang served as Prefect of the Majors for Official Carriages under the Ministry of Guards, in charge of receiving memorials to the throne as well as nominees for official appointments; when the government official Dan Song proposed the Chinese calendar should be reformed in 123 to adopt certain apocryphal teachings, Zhang opposed the idea. He believed they could introduce errors. Others shared Zhang's opinion and the calendar was not altered, yet Zhang's proposal that apocryphal writings should be banned was rejected; the officials
The li known as the Chinese mile, is a traditional Chinese unit of distance. The li has varied over time but was about one third of an English mile and now has a standardized length of a half-kilometer; this is divided into 1,500 chi or "Chinese feet". The character 里 combines the characters for "field" and "earth", since it was considered to be about the length of a single village; as late as the 1940s, a "li" did not represent a fixed measure but could be longer or shorter depending on the effort required to cover the distance. There is another li that indicates a unit of length 1⁄1000 of a chi, but it is used much less commonly; this li is used in the People's Republic of China as the equivalent of the centi- prefix in metric units, thus limi for centimeter. The tonal difference makes it distinguishable to speakers of Chinese, but unless noted otherwise, any reference to li will always refer to the longer traditional unit and not to either the shorter unit or the kilometer; this traditional unit, in terms of historical usage and distance proportion, can be considered the East Asian counterpart to the Western league unit.
Like most traditional Chinese measurements, the li was reputed to have been established by the Yellow Emperor at the founding of Chinese civilization around 2600 BC and standardized by Yu the Great of the Xia Dynasty six hundred years later. Although the value varied from state to state during the Spring and Autumn period and Warring States periods, historians give a general value to the li of 405 meters prior to the Qin Dynasty imposition of its standard in the 3rd century BC; the basic Chinese traditional unit of distance was the chi. As its value changed over time, so did the li's. In addition, the number of chi per li was sometimes altered. To add further complexity, under the Qin Dynasty, the li was set at 360 "paces" but the number of chi per bu was subsequently changed from 6 to 5, shortening the li by 1⁄6. Thus, the Qin li of about 576 meters became the Han li, standardized at 415.8 meters. The basic units of measurement remained stable over the Han periods. A bronze imperial standard measure, dated AD 9, had been preserved at the Imperial Palace in Beijing and came to light in 1924.
This has allowed accurate conversions to modern measurements, which has provided a new and useful additional tool in the identification of place names and routes. These measurements have been confirmed in many ways including the discovery of a number of rulers found at archaeological sites, careful measurements of distances between known points; the Han li was calculated by Dubs to be 415.8 metres and all indications are that this is a precise and reliable determination. Under the Tang Dynasty, the li was 323 meters. In the late Manchu or Qing Dynasty, the number of chi was increased from 1,500 per li to 1,800; this had a value of 644.6 meters. In addition, the Qing added a longer unit called the tu, equal to 150 li; these changes were undone by the Republic of China of Chiang Kai-shek, who adopted the metric system in 1928. The Republic of China continues not to use the li at all but only the kilometer. Under Mao Zedong, the People's Republic of China reinstituted the traditional units as a measure of anti-imperialism and cultural pride before adopting the metric system in 1984.
A place was made within this for the traditional units. A modern li is thus set at half a kilometer. However, unlike the jin, still preferred in daily use over the kilogram, the li is never used. Nonetheless, its appearance in many phrases and sayings means that "kilometer" must always be specified by saying gongli in full; as one might expect for the equivalent of "mile", li appears in many Chinese sayings and proverbs as an indicator of great distances or the exotic: One Chinese name for the Great Wall is the "Ten-Thousand-Li Long Wall". As in Greek, the number "ten thousand" is used figuratively in Chinese to mean any "immeasurable" value and this title has never provided a literal distance. Nonetheless, the actual length of the modern Great Wall is around 13,000 modern li – 3,000 more than the name's proverbially "immeasurable" length; the Chinese proverb appearing in chapter 64 of the Tao Te Ching and rendered as "A journey of a thousand miles begins with a single step" in fact refers to a thousand li: 千里之行，始于足下.
The greatest horses of Chinese history – including Red Hare and Hua Liu – are all referred to as "thousand-li horses", since they could travel a thousand li in a single day. Li is sometimes used for example: Wulipu, Hubei; the present day Korean ri and Japanese ri are units of measurements that can be traced back to the Chinese li. Although the Chinese unit was unofficially used in Japan since the Zhou Dynasty, the countries adopted the measurement used by the Tang Dynasty; the ri of an earlier era in Japan was thus true to Chinese length, corresponding to six chō, but evolved to denote the distance that a person carrying a load would aim to cover on mountain roads in one hour. Thus, there had been various ri of 36, 40, 48 chō. Tokugawa shogunate of Edo period defined 36 chō be 1 ri, allowing other variants, the Japanese government in 18
The tabulating machine was an electromechanical machine designed to assist in summarizing information stored on punched cards. Invented by Herman Hollerith, the machine was developed to help process data for the 1890 U. S. Census. Models were used for business applications such as accounting and inventory control, it spawned a class of machines, known as unit record equipment, the data processing industry. The term "Super Computing" was used by the New York World newspaper in 1931 to refer to a large custom-built tabulator that IBM made for Columbia University; the 1880 census had taken eight years to process. Since the U. S. Constitution mandates a census every ten years to apportion both congressional representatives and direct taxes among the states, a combination of larger staff and faster recording systems were required. In the late 1880s Herman Hollerith, inspired by conductors using holes punched in different positions on a railway ticket to record traveler details such as gender and approximate age, invented the recording of data on a machine readable medium.
Prior uses of machine readable media had been for lists of instructions to drive programmed machines such as Jacquard looms. "After some initial trials with paper tape, he settled on punched cards..." Hollerith used punched cards with 12 rows and 24 columns. His tabulator used electromechanical relays to increment mechanical counters. A set of spring-loaded wires were suspended over the card reader; the card sat over pools of mercury, pools corresponding to the possible hole positions in the card. When the wires were pressed onto the card, punched holes allowed wires to dip into the mercury pools, making an electrical contact that could be used for counting and setting off a bell to let the operator know the card had been read; the tabulator had 40 counters, each with a dial divided into 100 divisions, with two indicator hands. This arrangement allowed a count up to 10,000. During a given tabulating run, counters could be assigned a specific hole or, using relay logic, a combination of holes, e.g. to count married females.
If the card was to be sorted a compartment lid of the sorting box would open for storage of the card, the choice of compartment depending on the data in the card. Hollerith's method was used for the 1890 census. Clerks used keypunches to punch holes in the cards entering age, state of residence and other information from the returns; the advantages of the technology were apparent for accounting and tracking inventory. Hollerith started his own business as The Hollerith Electric Tabulating System, specializing in punched card data processing equipment. In 1896 he incorporated the Tabulating Machine Company. In that year he introduced the Hollerith Integrating Tabulator, which could add numbers coded on punched cards, not just count the number of holes. Punched cards were still read manually using the pins and mercury pool reader. 1900 saw the Hollerith Automatic Feed Tabulator used in that year's U. S. census. A control panel was incorporated in the 1906 Type 1. In 1911, four corporations, including Hollerith's firm, were amalgamated to form a fifth company, the Computing-Tabulating-Recording Company.
The Powers Accounting Machine Company was formed that same year and, like Hollerith, with machines first developed at the Census Bureau. In 1919 the first Bull tabulator prototype was developed. Tabulators that could print, with removable control panels, appeared in the 1920s. In 1924 CTR was renamed International Business Machines. In 1927 Remington Rand acquired the Powers Accounting Machine Company. In 1933 The Tabulating Machine Company was subsumed into IBM; these companies continued to develop faster and more sophisticated tabulators, culminating in tabulators such as the 1949 IBM 407 and the 1952 Remington Rand 409. Tabulating machines continued to be used well after the introduction of commercial electronic computers in the 1950s. Many applications using unit record tabulators were migrated to computers such as the IBM 1401. Two programming languages, FARGO and RPG, were created to aid this migration. Since tabulator control panels were based on the machine cycle, both FARGO and RPG emulated the notion of the machine cycle and training material showed the control panel vs. programming language coding sheet relationships.
In its basic form, a tabulating machine would read one card at a time, print portions of the card on fan-fold paper rearranged, add one or more numbers punched on the card to one or more counters, called accumulators. On early models, the accumulator register dials would be read manually after a card run to get totals. Models could print totals directly. Cards with a particular punch could be treated as master cards causing different behavior. For example, customer master cards could be merged with sorted cards recording individual items purchased; when read by the tabulating machine to create invoices, the billing address and customer number would be printed from the master card, individual items purchased and their price would be printed. When the next master card was detected, the total price would be printed from the accumulator and the page ejected to the top of the next page using a carriage control tape. With successive stages or cycles of punched-card processing complex calculations could be made if one had a sufficient set of equipment.
(In modern data processing terms, one can think of each stage as an SQL clause: SELECT WHERE maybe a GROUP BY for totals and counts a SORT BY.
The Arithmometer or Arithmomètre was the first digital mechanical calculator strong enough and reliable enough to be used daily in an office environment. This calculator could add and subtract two numbers directly and could perform long multiplications and divisions by using a movable accumulator for the result. Patented in France by Thomas de Colmar in 1820 and manufactured from 1851 to 1915, it became the first commercially successful mechanical calculator, its sturdy design gave it a strong reputation for reliability and accuracy and made it a key player in the move from human computers to calculating machines that took place during the second half of the 19th century. Its production debut of 1851 launched the mechanical calculator industry which built millions of machines well into the 1970s. For forty years, from 1851 to 1890, the arithmometer was the only type of mechanical calculator in commercial production, it was sold all over the world. During the part of that period two companies started manufacturing clones of the arithmometer: Burkhardt, from Germany, which started in 1878, Layton of the UK, which started in 1883.
About twenty European companies built clones of the arithmometer until the beginning of World War I. The arithmometers of this period were four-operation machines, it was a complicated design and few machines were built. Additionally, no machines were built between 1822 and 1844; this hiatus of 22 years coincides exactly with the period of time during which the British government financed the design of Charles Babbage's difference engine, which on paper was far more sophisticated than the arithmometer, but wasn’t finished at this time. In 1844 Thomas reintroduced his machine at the Exposition des Produits de l'Industrie Française in the newly created category of Miscellaneous measuring tools and calculating machines but only received an honorable mention, he restarted the development of the machine in 1848. In 1850, as part of a marketing effort, Thomas built a few machines with exquisite Boulle marquetry boxes that he gave to the crown heads of Europe, he filed two patents and two patents of addition in between 1849 and 1851.
The multiplier was removed, making the arithmometer a simple adding machine, but thanks to its moving carriage used as an indexed accumulator, it still allowed for easy multiplication and division under operator control. It was introduced in the UK at The Great Exhibition of 1851 and true industrial production started in 1851; each machine was given a serial number and user manuals were printed. At first, Thomas differentiated machines by capacity and therefore gave the same serial number to machines of different capacities; this was corrected in 1863 and each machine was given its own unique serial number starting with a serial number of 500. The constant use of some of the machines exposed some minor design flaws like a weak carry mechanism, given an adequate fix in 1856, an over rotation of the Leibniz cylinders when the crank handle is turned too fast, corrected by the addition of a Maltese cross. A patent covering all these innovations was filed in 1865; because of its reliability and accuracy, government offices, banks and businesses all over the world started using the arithmometer in their day-to-day operations.
Around 1872, for the first time in calculating machine history, the total number of machines manufactured passed the 1,000 mark. In 1880, twenty years before the competition, a mechanism to move the carriage automatically was patented and installed on some machines, but was not integrated into the production models. Under the management of Louis Payen, his widow, many improvements were introduced, such as an incline mechanism, a removable top and result windows that were easier to read, a faster re-zeroing mechanism. Many clone makers appeared during that period in Germany and the United Kingdom. Twenty independent companies manufactured clones of the arithmometer. All these companies were sold their machines worldwide; the fundamental design stayed the same. While in 1890, the arithmometer was still the most produced mechanical calculator in the world, ten years by 1900, four machines, the comptometer and Burroughs' adding machine in the USA, Odhner's Arithmometer in Russia, Brunsviga in Germany had passed it in volume of machines manufactured.
Production of the arithmometer stopped in 1915, during World War I. Alphonse Darras, who had bought the business in 1915, was unable to restart its manufacturing after the war because of the many shortages and a lack of qualified workers; because it was the first mass-marketed and the first copied calculator, its design marks the starting point of the mechanical calculator industry, which evolved into the electronic calculator industry and which, through the accidental design of the first microprocessor to be commercialized, the Intel 4004, for one of Busicom's calculators in 1971, led to the first commercially available personal computer, the Altair in 1975. Its user interface was used throughout during the 120 years that the mechanical calculator industry lasted. First with its clones and with the Odhner arithmometer and its clones, a redesign of the arithmometer with a pinwheel system but with the same user interface. Over the years, the term arithmometer or parts of it have been used on many different machines like Odhner's arithmometer, the Arithmaurel or the Comptometer, on some portable pocket calcu