TEAHLAB NEW ADDITION
BUILD. SAVE. SHARE.
The world's first and only Integrated Simulator Community.

Data Latch R/S Base

The interactive Data Latch Reset Set Base digital logic circuit, with Boolean function and truth table.
Click on the board to energize the circuit.VHDL Program
Watch Short Film
TRUTH TABLE
Input Output Comment
C D Q not-Q
1 0 0 1
1 1 1 0
0 X last Q last not-Q

INTRODUCTION

Perhaps the simplest memory device in real applications, the Data Latch is really a Clocked Set-Reset Latch with the inputs R and S tied together through an inverter. There are other designs, but essentially they are all the same. One Data Latch can only store one bit of information: a 0 or a 1. Consequently, you will not likely find a Data Latch in a computer. However, you will find the shift register, which is constituted of a group of Data Latches arranged in series. Other applications of the Data Latch abound. For example, most designers — especially students — design omnifarious sequential logic circuits using Data Latches.

Getting the State Transition Table and the State Diagram

A state transition table shows how the given state and the input condition of a circuit interact to produce the output of the circuit. As such, the table’s rows are labeled by state and the table’s columns are labeled by input condition. From the Boolean expression we just derived, we can see that the circuit is defined by one state variable q and two input variables D and Clk. Consequently, the state transition table will have two states/rows (q = 0 and q = 1) and four input conditions/columns (D Clk = 00, D Clk = 01, D Clk = 10, D Clk = 11). We show the table in table 1 below, using C for Clk.

Given state
q
Input Condition
CD=00 CD=01 CD=10 CD=11
0
1

Table 1

Next, to fill the table, evaluate the equation Q = D • Clk + D • q + Clk • q for Q by substituting the values q, C, and D. For example, to fill the cell where q = 0 intersect CD = 00, we evaluate Q at those values:

Q = D • Clk + D • q + Clk • q
Q = 0 • 0 + 0 • 0 + 0 • 0
Q = 0 • 0 + 0 • 0 + 1 • 0
Q = 0 + 0 + 0
Q = 0

As a result, we place a 0 in the first cell as shown in table 2.
Given state
q
Input Condition
CD=00 CD=01 CD=10 CD=11
0 0
1

Table 2


In table 3, we fill the remaining Q values for you. Feel free to double check our work for practice.

Given state
q
Input Condition
CD=00 CD=01 CD=10 CD=11
0 0 0 0 1
1 1 1 0 1

Table 3

Table 3 is pretty easy to understand. However, we are often required to show an even easier to understand representation of the circuit: a state diagram. We will show you the state diagram first; then we will use our words.

a state diagram image

Figure 3

Each circle in the state diagram represents a state, as the labels indicate, and the curved arrows represent movement between states resulting from the input conditions.

Our final step in the analysis is to indicate which transitions are unstable. There are two ways to tell where a circuit is unstable: there is an easy way, and then there is an easier way. The easy way is to look at the state transition table (table 3) and mark as unstable every cell where Q ≠ q. For example, when q = 0, if CD = 11, then Q = 1. Therefore mark that cell as unstable since Q ≠ q. The easier way is to just look at the state diagram and select as unstable the arrows that show movement from one state to another; the arrows that loop back to the same state are stable.

A Promise Kept

Okay. Earlier I promised to show you how those textbooks get Q = D • Clk + Clk • q. Here it is. Change the state transition table (table 3) into a K-map, by just swapping the column where CD = 10 with the column where CD = 11, and then solve the K-map for a switching function

Given state
q
Input Condition
CD=00 CD=01 CD=10 CD=11
0 0 0 0
1
1
1
1
0
1

Table 4: Karnaugh Map


From the K-map you should get Q = C • D + C • q. So which one is correct? Well, let’s see. We created the Kmap using a state transition table that we got from Q = D • Clk + D • q + Clk • q. Consequently, the two expressions are equivalent.

Teahlab on LinkedIn     Teahlab on Facebook