and the truth table is
Clock |
S |
R |
Q0n |
Q'0n |
0 |
X |
X |
Q0n |
Q'0n |
1 |
0 |
0 |
Q0n |
Q'0n |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
Q0n |
Q'0n |
for analyzing this, the basics we required about 2-input NAND gate
if atleast one i/p is zero, the NAND gate o/p is 0.
but atleast 1 i/p is one , we can't say any thing, we should depend upon the other i/p
1) when clock is absent ===> clock = 0, then NAND1 and NAND2 outputs 1, ===> One of the i/p of NAND3 and NAND4 are 1
therefore you have to depend upon previous values in this case
if previously Q0 =0 and Q'0 = 1
i/p of NAND3 are 1 and 1 ===> output is 0 ===> Q0=0
i/p of NAND4 are 1 and 0 ===> output is 1 ===> Q'0=1
if previously Q0 =1 and Q'0 = 0
i/p of NAND3 are 1 and 0 ===> output is 1 ===> Q0=1
i/p of NAND4 are 1 and 1 ===> output is 0 ===> Q'0=0
By these points i summarized that when clock=0, output is same as previous values irrespective of S and R values
2) CLK=1 , S=0, R=0 ===> NAND1 and NAND2 outputs 1, ===> One of the i/p of NAND3 and NAND4 are 1
therefore you have to depend upon previous values in this case
if previously Q0 =0 and Q'0 = 1
i/p of NAND3 are 1 and 1 ===> output is 0 ===> Q0=0
i/p of NAND4 are 1 and 0 ===> output is 1 ===> Q'0=1
if previously Q0 =1 and Q'0 = 0
i/p of NAND3 are 1 and 0 ===> output is 1 ===> Q0=1
i/p of NAND4 are 1 and 1 ===> output is 0 ===> Q'0=0
By these points i summarized that when clock=1,S=0,R=0, then output is same as previous values .
3) CLK=1 , S=0, R=1 ===> NAND1 outputs 1, and NAND2 outputs 0, ===> One of the i/p of NAND3 is 1 but NAND4 input 0
therefore NAND4 outputs 1 (Q'0 = 1), which will be feedback to input of NAND3 ===> inputs of NAND3 are 1 and 1 ==> Q0=0
4) CLK=1 , S=1, R=0 ===> NAND1 outputs 0, and NAND2 outputs 1, ===> One of the i/p of NAND3 is 0 but NAND4 input 1
therefore NAND3 outputs 1 (Q0 = 1), which will be feedback to input of NAND4 ===> inputs of NAND4 are 1 and 1 ==> Q'0=0
5) CLK=1 , S=1, R=1 ===> NAND1 outputs 0, and NAND2 outputs 0, ===> One of the i/p of NAND3 is 0 and NAND4 input 0
therefore NAND3 outputs 1 (Q0 = 1), NAND4 outputs 1 (those outputs are feedbacking but no use ) ==> Q'0=1 and Q0=1
due to this reason, we say in S-R flipflop S=R=1 is invalid combination