# BCD up Counter

Cuthbert Nyack
A simple application of a digital electronics sequential circuit is shown below. It is a BCD up counter using J/K flip-flops. The flip-flops have internal AND gates which AND'S all the inputs to the J or K inputs. Clicking on the CLOCK tab changes the state of the counter (state changes when mouse button is released). At any time the flip-flops can be cleared by clicking on the CLEAR tab. Note the J and K inputs before each clock pulse and how the flip-flop changes. Blue corresponds to LOW and red to HI. LSB is A and MSB is D. The table below shows the changes that take place when a clock pulse arrives with the J and K values indicated.

Output Change For J,K inputs
J input K input Output Change
0 x 0 ® 0
1 x 0 ® 1
x 1 1 ® 0
x 0 1 ® 1

From the above table a new table can be drawn up showing the values required at the J and K inputs for each clock pulse. To go from count 0 to count 1, D, C and B must remain at 0. From above table this means J(D) = J(C) = J(B) = 0 and K(D) = K(C) = K(B) = x. The least significant bit A must change from 0 to 1. From above table this means J(A) = 1 and K(A) = x. This gives the first row of the table below.

Table of J,K inputs for required output change in D,C,B and A
Count D C B A J(D) J(C) J(B) J(A) K(D) K(C) K(B) K(A)
0 0 0 0 0 0 0 0 1 x x x x
1 0 0 0 1 0 0 1 x x x x 1
2 0 0 1 0 0 0 x 1 x x 0 x
3 0 0 1 1 0 1 x x x x 1 1
4 0 1 0 0 0 x 0 1 x 0 x x
5 0 1 0 1 0 x 1 x x 0 x 1
6 0 1 1 0 0 x x 1 x 0 0 x
7 0 1 1 1 1 x x x x 1 1 1
8 1 0 0 0 x 0 0 1 0 x x x
9 1 0 0 1 x 0 0 x 1 x x 1

From above Table one can immediately see that J(A) = K(A) = 1. Karnaugh maps for J(B) and K(B) are shown below.
Karnaugh maps are obtained by representing each column of the above table in a 4 variable Karnaugh map. Values from 10 to 15 are represented by don't care x states. The map for J(B) is shown in the table below.

Karnaugh Map for J(B)
!A A A !A
!B 0 1 1 0 !D
B x x x x !D
B x x x x D
!B 0 0 x x D
!C !C C C
J(B) = A!D
Using squares with orange letters and light blue background gives J(B) = A!D.

Karnaugh Map for K(B)
!A A A !A
!B x x x x !D
B 0 1 1 0 !D
B x x x x D
!B x x x x D
!C !C C C
K(B) = A
Using squares with orange letters and light blue background gives K(B) = A.

Similar analysis shows
J(C) = AB, K(C) = AB, J(D) = ABC and K(D) = A.