Design of Synchronous Counters

by Lee Chin Wei



Counters are essentially state (sequential) machines. In Article 1, the counters discussed were implemented with flip-flops (mainly T flip-flops, or J-K flip-flops with both inputs tied) and logic gates. This traditional method of implementing combinational/sequential logic functions has been applied for decades. Since this method often results in minimum component cost for many systems, it continues to represent a popular approach. This is however by no means the only way that synchronous counters, or any other combinational/sequential logic for that matter, can be constructed. In this article, the use of the microprocessor as a state machine rather than the conventional method is first discussed. Then alternative configurations for state machines will be looked at. There are circuits available for function realization that lead to other advantages over gate implementations. In this article, the techniques that will be discussed are:

These techniques are not limitted to the design of counters alone but extend to all state machines.

Microprocessor vs. Conventional State Machine

There are several differences between using a microprocessor as a state machine and a conventional state machine. A conventional state machine allows input information to directly determine the next state to which the system branches. The microprocessor must read the external inputs into the accumulator then check the accumulator contents to determine the next state. The microprocessor can also perform arithmetic or logical operations during any state, producing results that can be stored or used for branching purposes. The conventional system has no manipulative capabilities.

The advantage of using a microprocessor lies in the fact that it can act not only as a state machine controller, but it can also perform many functions. In the design of a synchronous counter for example, if addition or subtraction is required, the microprocessor can accomplish this function with its internal arithmetic unit. In conventional state machines, extra circuitry must be provided for these purposes. Thus, the microprocessor can consolidate the control function and other component functions into a single unit.

A second strength of a microprocessor is the very large number of states that can be generated without increasing system complexity. In a conventional state machine, additional states require more flip-flops, and more flip-flops lead to difficult design procedures. The number of states in a microprocessor is only limitted by the size of the program memory area.

Another advantage of the microprocessor is the flexibility due to its programmability. A single microprocessor can function as multiple state machines. A microprocessor can contain several seperate program sequences. For example, many different kinds of counters can be implemented using a single microprocessor whereas to do that using conventional state machine, many different chips, each containing implementations of different kinds of counters, will probably be needed.

However, there are also disadvantages in using the microprocessor to implement state machines. One major disadvantage is cost for small systems. If we only need a single 3-bit binary counter for instance, it would be much more costly to implement it using a microprocessor. Besides, a microprocessor frequently needs several support chips to create a functioning system. There is also an additional cost when using a microprocessor. The microprocessor system requires programming. This means either paying the manufacturer to program the ROM or if it were to be done by the designer himself, the cost of labour and a ROM burner. Usually, for systems requiring less than 32 states, the conventional state machine can be constructed at a lower cost.

Another weakness of the microprocessor is its speed compared to a conventional state machine. Several machine cycles are required at each state of the microprocessor due to the read/write operations and some other manipulative operations. The speed advantage of conventional state machines typically exceed two orders of magnitude.

A microprocessor is used when we require either a large number of states or programmability and speed is not too important.

Alternative Configurations for State Machines

A state (sequential) machine usually consists of two parts: Flip-flops are needed to store the state which the system is in, and combinational logic, to perform Boolean arithmetic. In a synchronous counter for example, the flip-flops are used to store/output the current state and the combinational logic is used to calculate the next state. There are many ways in which this combinational logic is made, and a few of them are discussed here.


A multiplexer (MUX), also known as a data selector, is a combinational network containing up to 2n data inputs, n control inputs, and an output. The MUX allows one of the 2n to be selected as the output. The control lines are used to make this selection. A MUX with 2n input lines and n selection lines (referred to as a 1-of-2n MUX) may be wired to realize any Boolean function of n + 1 variables.

Diagram of a multiplexer

In the diagram above, the 3 control lines, I2, I 1 and I0 are used to represent the three variables, and the data inputs, D0, D1, D 2... will be the values for (not I2, not I1 , not I0), (not I2, not I1, I0 ), (not I2, I1, not I0)...

Multiplexers provide the designer with numerous choices. It is also easier to design since the logic does not need to be minimised. MUXs are also quite fast. However, multiplexers usually cost more than gates.

Read-Only Memory (ROM)

A read-only memory, as the name implies, is intended to hold fixed information that can be read and not altered. The information must be specified by the designer and is then embedded in the unit to form the required interconnection pattern. In a variant of the ROM, the field programmable ROM (FPROM), the pattern may be defined by the user. And in another variant, the erasable PROM (EPROM), the program inside the chip can be erased using strong ultraviolet light. The ROM has address inputs to select a particular memory location, data outputs carrying the information from the selected location, and enable inputs.

Diagram of a CMOS ROM

To use the device as a combinational logic circuit implementing a Boolean expression, the address inputs of the memory become the Boolean input variables and the data outputs become the required functions. The functions need to be expanded into canonical form (every variable appearing in each term) for ROM implementation (every term representind an address). This is because each minterm is used to represent an address.

Programmable Logic Arrays (PLA)

A combinational circuit may have don't care conditions. In a ROM implementation, these conditions become addresses that will never occur. Because not all the bit patterns available are used, it is considered a waste of equipment. For cases where the number of don't-care conditions is excessive, it is more economical to use PLA. It is similar to a ROM in concept, but does not provide full decoding of the variables and does not generate all the minterms as in the ROM.

Diagram of a PLA

As with the ROM, the field-programmable and the erasable variants are also available.


Comparing between a synchronous counter made with dedicated hardware and programmable devices, a trade-off between speed and flexibility can be noticed. An off-the-shelf counter will almost definitely perform better than a programmed one but the programmed counter offers more flexibility in the sense that it can be custom made to tailor to the specific needs of the application.


Digital Logic and Computer Design
M. Morris Mano

Digital Design : principles and practices
John F. Wakerly

Disciplines in Combinational and Sequential Circuit Design
R.M.M. Oberman

An Engineering Approach to Digital Design
William I. Fletcher

Digital Design : a pragmatic approach
E. L. Johnson, M. A. Karim

Practical Digital Design Using ICs
Joseph D. Greenfield

Digital System Design
Barry Wilkinson,Rafic Makki

Digital Electronics
Christopher E. Strangio

Counting and Counters
R.M.M. Oberman

Digital Design
M. Morris Mano

Electronic Counters
R.M.M. Oberman

Supervisor Dr. Wayne Luk (
Partner Andrew Long(gsal)
Partner's Article 2 : Fast Counter Techniques.

~The End.~