A
Logic Problem (5.1)
Dr. Abner Mallity has been working with a counter circuit. He has
a counter that requires the following:
-
To count up, hold
pin D high (5v), and put the pulse into pin U.
-
To count down, hold
pin U high (5v), and put the pulse into pin D.
What Mallity wants is
a circuit that will do the following.
-
To count up, hold
pin X high (5v) and put the pulse to be counted into pin Y.
-
To count down, hold
pin X low (0v) and put the pulse to be counted into pin Y.
-
i.e. he wants a box
that does this:
Your Job:
Your job is to design the "stuff" inside the box.
-
The
first thing to do is to get a truth table. Here is the first shot
at a truth table. The one thing we know, is that we want D high when
we want to count up (X = 1) and we want D low when we want to count down
(X = 0). We can fill in that part of the table.
|
X
|
Y
|
U
|
D
|
|
0
|
0
|
1
|
|
|
0
|
1
|
1
|
|
|
1
|
0
|
|
1
|
|
1
|
1
|
|
1
|
-
Next,
we want to pulse to go into D when we want to count down, and into U when
we want to count up. That simply means that D = 0 when the pulse
is 0 and D = 1 when the pulse is 1.
|
X
|
Y
|
U
|
D
|
|
0
|
0
|
1
|
0
|
|
0
|
1
|
1
|
1
|
|
1
|
0
|
0
|
1
|
|
1
|
1
|
1
|
1
|
-
That
gives us the complete truth table, and we can write the function from the
truth table.
-
D =
X + Y (Pretty straight-forward, and it gives us a clue that the other function
is something like that as well.
-
U =
(~X) + Y
-
The
implementation is pretty straight-forward, and we don't show it here.