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

SR Master Slave Flip-Flop

The interactive Set Reset [RS] Master Slave Flip Flop digital logic circuit, with Boolean function and truth table.
Click on the board to energize the circuit.
TRUTH TABLE
Inputs Outputs
S R Next state of Q
0 0 Q
0 1 0
1 0 1
1 1 Undefined

INTRODUCTION TO THE MASTER-SLAVE DESIGN

The master-slave flipflop design demonstrates one of the most fundamental concepts in modern engineering: Defense in Depth. The basic idea behind the Defense in Depth design philosophy is that you never want to build a system that is vulnerable to a single failure. Accordingly, to minimize the risk associated with your design, you must take preemptive measures to reduce the probability of failure or to mitigate the consequence of failure. One of the simplest and most straightforward means of accomplishing Defense in Depth is Redundancy for Reliability.

State Transition Table

As evidenced by the Boolean expression we just derived, the master-slave flipflop has two state variables qm and qs and three input variables C, S, and R. As such, the flipflop has four states and eight different input conditions. We show the resulting state transition table below.

Given state
qmqs
Input Condition
CSR
000 001 010 011 100 101 110 111
00
01
10
11

Table 1


Our next step is to fill the table with the appropriate valuations of Qs and Qm in each cell. We do that by evaluating both Qs and Qm at the appropriate values of qmqs and CSR. For example, to fill the cell where qmqs = 10 and CSR = 000, we solve the Boolean expression and get

Qm = S • C + R • qm + C • qm The master latch.
Qm = 0 • 0 + 0 • 1 + 0 • 1
Qm = 0 • 0 + 1 • 1 + 1 • 1
Qm = 0 + 1 + 1
Qm = 1

Qs= qmC + C • qm • qs + R • qm • qs + C • qs The slave latch.
Qs= 1 • 0 + 0 • 1 • 0 + 0 • 1 • 0 + 0 • 0
Qs= 1 • 1 + 1 • 1 • 0 + 1 • 1 • 0 + 0 • 0
Qs= 1 + 0 + 0 + 0
Qs= 1

Hence, we fill in the cell as shown in table 2 below.

Given state
qmqs
Input Condition
CSR
000 001 010 011 100 101 110 111
00
01
10 11
11

Table 2


We fill the rest of the table for you, as shown in Table 3 below. We welcome you to practice your evaluation skills by checking that our valuations are correct.

Given state
qmqs
Input Condition
CSR
000 001 010 011 100 101 110 111
00 00 00 00 00 00 00 10 10
01 00 00 00 00 01 01 11 11
10 11 11 11 11 10 00 10 10
11 11 11 11 11 11 01 11 11

Table 3


This is a pretty large table, so let’s observe a few facts. Notice that when the door to the master latch is closed (i.e. C = 0), the output of the slave latch is equal to the output of the master latch no matter what else may be going on – as we expected all along. Observe further that the outputs are driven by the given state of the master latch (qm) during that time. What this second piece of detail means is that once we close the door to the master latch, before the output of the slave latch gets a stable signal, the master will stabilize and settles into a definite voltage or current level. Furthermore, notice that when the door to the master latch is opened, the output of the slave latch is equal to the given state of the slave latch (Qs = qs). The meaning of this is that the output signal of the slave latch has settled down into a definite value. Again, this too we expected, and it is part of the reason a master-slave flipflop is so robust and reliable.

Just as we did with the table for the gated/clocked SR latch, we rewrite a condensed version of table 3 and show it below as table 4.

Given state
qmqs
Input Condition
CSR
0xx 100 101 110 111
00 00 00 10 10 10
01 00 01 01 11 11
10 11 10 00 10 10
11 11 11 01 11 11

Table 4


The State Diagram

We now proceed to draw the state diagram from the information in table 4 (or table 3 if you want). As you will see below, a state diagram is just a picture that uses circles and arrows to show how the circuit moves between states. The Xs in the figure mean it does not matter if the cipher at that location is 0 or 1.

a state diagram image

Figure 1


State Transitions Stability

Our final step is to clearly distinguish the stable state transitions from the unstable state transitions. In the state diagram the unstable state transitions are represent by the arrows that point from one circle to another. In the table, on the other hand, the unstable transitions are cells where QmQs is not equal to qmqs. In table 5 below we show the unstable transitions in green.

Given state
qmqs
Input Condition
CSR
0xx 100 101 110 111
00 00 00 10 10 10
01 00 01 01 11 11
10 11 10 00 10 10
11 11 11 01 11 11

Table 5


Teahlab on LinkedIn     Teahlab on Facebook