|
Q:How to convert D-latch into JK-latch
and JK-latch into D-latch?
Compare the truth tables of D-latch and JK-latch accordingly:
clk D Q
==================
+ 0 0
+ 1 1
clk J K Q
=========================
+ 0 0 hold
+ 0 1 0
+ 1 0 1
+ 1 1 switch to opposite
Using these truth tables it is easy to convert JK-latch into D-latch.
_______
D | | Q
___________|J |----
| | |
__|__ > clk | _
\ / | | Q
\ / ___|K |----
v | |_______|
o |
|____|
To convert D-latch into JK-latch some extra logic is required.
The following table shows the relation between J,K and D
J K D
=================
0 0 Q
0 1 0
1 0 1
1 1 !Q
_______________________________
| |
___|___ _______ |
| | | | |
_J__| |_______________|D Q |---'
| A | | |
| | | |
K | | |clk _ |
----| | --| Q |--.
|_______| |_______| |
| |
|_______________________________|
Looking at the drawing and the table it is not a problem to implement block A.
Probably the easiest way is to use a MUX.
J and K are control signals and 1,0,Q,!Q are data inputs.
|
|
|