Counters and Decoders: Purpose
Counters and Decoders: Purpose
In this experiment, you will design and construct a 4-bit ripple-through decade counter with a
decimal read-out display. Such a counter might be used for counting the number of α-particles you
observed in a particle detector.
Reading
Theory
Counters
In the synchronous counter in Fig. 10.1 (b), the problem is corrected by feeding the clock pulses
simultaneously into every flip-flop. Whether or not this causes a change of state is determined by
the J and K inputs used as dynamic controls. In the first flip-flop, J = K = 1 as before. In
subsequent chips, J = K, but the logical value is determined by an AND gate. Thus, J2 = Q1 • Q0 ,
J3 = Q2 • (Q1 • Q0 ), and so on. The response of the jth flip-flop to the (n+1)th clock pulse can be
represented by:
(Q )
j n+1 = (Qj )n ⊕ Q0 • Q1 • L• Qj −1
[ ]
n
The jth flip-flop changes at the instant of the next clock pulse (plus a single delay of 25 nsec), if
and only if every previous flip-flop in the chain is already in logical state Q=1. If one or more or
the previous flip-flops is in logical 0, the state of the jth flip-flop remains the same. The overall
effect is the same as in the ripple counter, but the delays do not accumulate.
For each decimal number, N, there is a Boolean expression which represents the logical operations
that you perform on the binary outputs to identify the decimal number. The truth table and Boolean
expressions for some 3-bit numbers are shown in the diagram. In practice, you write a bar over the
Q when the corresponding bit is 0 and leave out the bar when it is 1. The Boolean expression for a
given decimal number gives zero for all combinations of bits that do not represent the number and
give 1 for the correct combination. Consider for example, the binary number 1001 representing the
decimal number, 9. Replace each binary 0 by a Q so that
Q3 • Q2 • Q1 • Q0 = 1• 0 • 0 • 1 = 1 •1• 1• 1 = 1 . You get a ‘true’ result only for the number 1001.
The output is zero for every other bit combination.
Recall that during normal operation, the direct input of every flip-flop is held at CLR = 1. When
CLR = 0, all outputs go to zero. The Modulo-5 counter is reset to zero by every 5th pulse using the
CLR input. The 5th pulse is identified when the bit pattern satisfies the equation: Q2 • Q1 • Q0 = 1.
However, the Q1 is redundant, and the 5th pulse is uniquely identified in this counter by the
expression Q2 • Q0 = 1 . We set CLR = 0 by using a NAND gate to evaluate the expression.
Q2Q1Q0 = 0
Q2Q1Q0 = 1
Q2Q1Q0 = 2
Q2Q1Q0 = 3
Q2Q1Q0 = 4
Simplification of Decoder
Q2 Q1 Q0
Decimal Binary Boolean Q2 Q1 Q0
Q 2Q1Q0
0 000 Q2Q1Q0=Q 2D=Q2+D
1 001 Q2Q1Q0=Q 1Q0 =Q 1+Q0
2 010 Q2Q1Q0=Q 1Q0 =Q 1+Q0
3 011 Q2Q1Q0=Q 1Q0 =Q 1+Q0
4 100 Q2Q1Q0=Q 2D=Q2+D
notes: D=Q1 Q0
the block of Q2 ’s is redundant
a) Refer to Experiment 9, page 9.6 for evaluation of 4-element products of the ABCD.
b) Note that both the output, Q, and its complement are available from each flip-flop.
d) Look for repeated combinations and evaluate them only once. Q1 Q0 is repeated for decimals 0
and 4. We evaluate it once and call is D.
e) The total number of chips on the board is often reduced by avoiding INVERTS. Unused gates
on your NAND or NOR chips can be converted to INVERTS as shown in Exp. #9.
Problems
The methods for solving these problems are illustrated in the notes by the design of a 3-digit
modulo-5 counter with decimal readout.
1. Draw the circuit for a 4-bit ripple-through binary counter using JK flip-flops. Arrange that the
input can be gated by separate control of J and K for the first flip-flop; also that the entire
counter can be reset to zero. Write down the truth table for the first 12 pulses and draw the
waveforms that you would expect for C0, Q0 , Q1 , Q2 , and Q3 . Neglect the small delay
introduced by each flip-flop. See Fig. 10.1.
2. Design the modifications you need to convert your binary counter to a decade counter. Write
the truth table for the first 12 pulses and graph the expected waveforms. See Fig. 10.2.
3. Design a 4-bit BCD to decimal decoder whose inputs are provided by the outputs of your
decade counter. Write down the truth table and the Boolean expression for each decimal output
(0 thru 9). Simplify your circuit to use the smallest number of 2-input NOR and NAND gates.
See Fig. 10.3 for a modulo-5 decoder.
1. Design the circuits needed for the experiment. See the problems for details. Write down the
circuits, truth tables, and predicted waveforms in you lab book before the class. Also a detailed
wiring diagram for your circuit board is very helpful. Good organization is especially
important with so many chips.
2. Construct a 4-bit ripple-through binary counter using JK flip-flops. Check that it functions
correctly when driven by 250 µsec. pulses from your 555 clock at a rate of 1 kHz. Observe the
input pulses and the outputs Q0 , Q1 , Q2 , and Q3 with the oscilloscope. A stable display can
only be obtained by triggering the scope from Q3 . Why? Draw the waveforms carefully and
verify the truth table from your drawing. Check that the input gate and the zero reset function
correctly.
3. Modify your circuit to make a decade counter. Check that the outputs now satisfy the truth
table for BCD numbers using the same method as in part 2.
4. Construct a 4-bit BCD to decimal decoder. Connect the inputs of your decoder to the
appropriate flip-flop outputs of your counter. Display the ten decoder outputs (0 thru 9) on
LED indicators. Verify that the system operates correctly by observing the LEDs when the
input pulse rate is slow enough that you can see each one light up in turn.