{"id":4592,"date":"2020-03-25T16:46:51","date_gmt":"2020-03-25T14:46:51","guid":{"rendered":"https:\/\/dcaclab.com\/blog\/?p=4592"},"modified":"2020-05-13T21:10:58","modified_gmt":"2020-05-13T19:10:58","slug":"sr-flip-flop-explained-in-detail","status":"publish","type":"post","link":"https:\/\/dcaclab.com\/blog\/sr-flip-flop-explained-in-detail\/","title":{"rendered":"SR Flip Flop Explained in Detail"},"content":{"rendered":"\r\n<p>Flip &#8211; flops are one of the most fundamental electronic components. These are used as one-bit storage elements, clock dividers, and also we can make counters, shift registers and storing registers by connecting the flip flops in particular sequences. These flip flops use feedback concept to create sequential logic where the previous state affect future states (unlike combinational circuit).<\/p>\r\n<p>The common types of flip flops are as follows:<\/p>\r\n<ul>\r\n<li>S-R Flip Flop (Reset-set)<\/li>\r\n<li><a href=\"https:\/\/dcaclab.com\/blog\/j-k-flip-flop-explained-in-detail\/\">J-K Flip Flop (Jack-Kilby)<\/a><\/li>\r\n<li><a href=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/\">D Flip Flop (Data)<\/a><\/li>\r\n<li><a href=\"https:\/\/dcaclab.com\/blog\/t-flip-flop-explained-in-detail\/\">T Flip Flop<\/a> (Toggle)<\/li>\r\n<\/ul>\r\n<p>SR (set-reset) flip flop is a sequential circuit consisting of two logic gates (mostly NAND or NOR gate). Here cross-coupling or positive feedback is formed. To achieve this we connect the output of each gate to the input of the other gate available. The storing bit present on the output with a label as Q.<\/p>\r\n<div id=\"attachment_4607\" style=\"width: 172px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4607\" data-attachment-id=\"4607\" data-permalink=\"https:\/\/dcaclab.com\/blog\/sr-flip-flop-explained-in-detail\/osillo1-8\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25163232\/osillo1-7.png?fit=132%2C126&amp;ssl=1\" data-orig-size=\"132,126\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Symbol of SR Flip Flop\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Symbol of SR Flip Flop&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25163232\/osillo1-7.png?fit=132%2C126&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25163232\/osillo1-7.png?fit=132%2C126&amp;ssl=1\" class=\" wp-image-4607\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25163232\/osillo1-7.png?resize=162%2C155&#038;ssl=1\" alt=\"\" width=\"162\" height=\"155\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4607\" class=\"wp-caption-text\">Symbol of SR Flip Flop<\/p><\/div>\r\n\r\n\r\n\r\n<p>Now, one should not get a question that why the name is S-R flip only! are these some abbreviation? or initial of the inventor&#8217;s name?<\/p>\r\n\r\n\r\n\r\n<p>No, &#8216;R&#8217; and &#8216;S&#8217; are simply the first letter of the two input names.<\/p>\r\n<h2>Direct Coupled SR Flip Flop or SR Latch<\/h2>\r\n<p>It is a cross-coupled NAND or NOR gates as discussed earlier.<\/p>\r\n<h3>NAND Gate Latch<\/h3>\r\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4601\" data-permalink=\"https:\/\/dcaclab.com\/blog\/sr-flip-flop-explained-in-detail\/osillo1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161020\/osillo1-1.png?fit=283%2C175&amp;ssl=1\" data-orig-size=\"283,175\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"osillo1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161020\/osillo1-1.png?fit=283%2C175&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161020\/osillo1-1.png?fit=283%2C175&amp;ssl=1\" class=\"aligncenter size-full wp-image-4601\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161020\/osillo1-1.png?resize=283%2C175&#038;ssl=1\" alt=\"\" width=\"283\" height=\"175\" data-recalc-dims=\"1\" \/><\/p>\r\n<h4>Truth Table<\/h4>\r\n<table style=\"border-collapse: collapse;width: 100%;height: 115px\">\r\n<tbody>\r\n<tr style=\"height: 23px\">\r\n<td style=\"width: 25%;height: 23px;text-align: center\"><strong>S<\/strong><\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\"><strong>R<\/strong><\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\"><strong>Q<\/strong><\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\"><strong>Q&#8217;<\/strong><\/td>\r\n<\/tr>\r\n<tr style=\"height: 23px\">\r\n<td style=\"width: 25%;height: 23px;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">1(invalid)<\/td>\r\n<\/tr>\r\n<tr style=\"height: 23px\">\r\n<td style=\"width: 25%;height: 23px;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">0<\/td>\r\n<\/tr>\r\n<tr style=\"height: 23px\">\r\n<td style=\"width: 25%;height: 23px;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">1<\/td>\r\n<\/tr>\r\n<tr style=\"height: 23px\">\r\n<td style=\"width: 25%;height: 23px;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">\r\n<p>0<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 25%;height: 23px;text-align: center\">\r\n<p>1(Previous State)<\/p>\r\n<p>0<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p>\r\n\r\n<\/p>\r\n<p>We can see from the table that on giving active-low inputs (for both), both the outputs become active high (1) which is an invalid case. This is because Q and Q&#8217; are complementary to each other. On the other hand, when both the inputs are active high,i.e., 1 then the output follows the previous state.<\/p>\r\n<p>From the above discussion, we can note the following things about the basic bi-stable element.<\/p>\r\n<ol>\r\n<li>The outputs Q &amp; Q&#8217; are complementary.<\/li>\r\n<li>The circuit has two stable states. The state corresponds to Q=1 is referred to as\u00a0<strong>1 state\u00a0<\/strong>or\u00a0<strong>set state\u00a0<\/strong>and corresponds to Q=0 is referred to as <strong>0 state<\/strong> or<strong> reset state<\/strong>.<\/li>\r\n<li>If the circuit is in set (1) state, it will remain in the set state &amp; if the circuit is in reset (0) state, it will remain in the reset state. This property of the circuit shows that it can store 1-bit of digital information. Therefore, the circuit is called a <strong>1-bit memory cell<\/strong>.<\/li>\r\n<li>The 1-bit information stored in the circuit is locked or latched in the circuit. Therefore, this circuit is also referred to as a latch.<\/li>\r\n<\/ol>\r\n<h2>Modified SR Latch<\/h2>\r\n<p>If in fig.1, two inverters are connected to enter the digital information and the inputs are S &amp; R respectively then this latch is also called as SR latch.<\/p>\r\n<div id=\"attachment_4603\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4603\" data-attachment-id=\"4603\" data-permalink=\"https:\/\/dcaclab.com\/blog\/sr-flip-flop-explained-in-detail\/osillo1-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161615\/osillo1-3.png?fit=570%2C252&amp;ssl=1\" data-orig-size=\"570,252\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"osillo1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161615\/osillo1-3.png?fit=300%2C133&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161615\/osillo1-3.png?fit=570%2C252&amp;ssl=1\" class=\"wp-image-4603 size-full\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161615\/osillo1-3.png?resize=570%2C252&#038;ssl=1\" alt=\"\" width=\"570\" height=\"252\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4603\" class=\"wp-caption-text\">Fig: Modified circuit for SR latch<\/p><\/div>\r\n<p>Consider the following cases:<\/p>\r\n<h3>Case 1 : S = R = 0<\/h3>\r\n<p>In this case, S&#8217; = R&#8217; = 1. If Q is 1, Q and the other input for 2<sup>nd<\/sup> NAND gate are both 1 and hence Q&#8217; = 0. Since, Q&#8217; = 0 &amp; S&#8217; = 1, the output of 1<sup>st<\/sup> NAND gate is 1, Q = 1.<\/p>\r\n<p>Similarly, calculate when Q = 0.<\/p>\r\n<p><span style=\"color: #999999\">This shows that when S = R = 0, the outputs do not change.<\/span><\/p>\r\n<h3>Case 2 : S = 1 and R =0<\/h3>\r\n<p>In this case, S&#8217; = 0 and R&#8217; = 1. Since S&#8217; = 0, the output of 1<sup>st<\/sup> NAND gate, Q =1. For 2<sup>nd<\/sup> NAND gate, both inputs Q and R&#8217; are 1, thus output Q&#8217; = 0.<\/p>\r\n<p><span style=\"color: #999999\">The inputs S=1 and R = 0, makes Q = 1, i.e., <strong><span style=\"color: #000000\">set<\/span><\/strong> state.<\/span><\/p>\r\n<h3>Case 3 : S = 0 and R = 1<\/h3>\r\n<p>Since R&#8217; = 0, the output of 2<sup>nd<\/sup> NAND gate, Q&#8217; = 1. For 1<sup>st<\/sup> NAND gate, both inputs Q&#8217; and S&#8217; are 1, thus output Q = 0.<\/p>\r\n<p><span style=\"color: #999999\">The inputs S = 0 and R = 1, makes Q = 0, i.e., <span style=\"color: #000000\"><strong>reset<\/strong><\/span> state.<\/span>\u00a0 \u00a0<\/p>\r\n<h3>Case 4 : S = 1 and R = 1<\/h3>\r\n<p>When S = R = 1, both the inputs Q and Q&#8217; try to become 1 which is not allowed and therefore, this input condition is prohibited.<\/p>\r\n<h2>Gated SR Latch<\/h2>\r\n<p>In the S R latch, we have seen that output changes occur immediately after the input changes occur i.e., the latch is sensitive to its S &amp; R inputs at all times. However, it can easily be modified to create a latch that is sensitive to these inputs only when an enable input is active.<\/p>\r\n<div id=\"attachment_4604\" style=\"width: 591px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4604\" data-attachment-id=\"4604\" data-permalink=\"https:\/\/dcaclab.com\/blog\/sr-flip-flop-explained-in-detail\/osillo1-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161742\/osillo1-4.png?fit=581%2C256&amp;ssl=1\" data-orig-size=\"581,256\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"SR Flip Flop (with clock input)\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;SR Flip Flop (with clock input)&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161742\/osillo1-4.png?fit=300%2C132&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161742\/osillo1-4.png?fit=581%2C256&amp;ssl=1\" class=\"wp-image-4604 size-full\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161742\/osillo1-4.png?resize=581%2C256&#038;ssl=1\" alt=\"\" width=\"581\" height=\"256\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4604\" class=\"wp-caption-text\">Fig: SR latch with enable input (SR Flip Flop) using NAND gates<\/p><\/div>\r\n<p>Below is the truth table where the circuit behaves like a S R latch when enable (EN = 1), and retains its previous state when EN = 0.<\/p>\r\n<table style=\"border-collapse: collapse;width: 100%\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 16.6667%;text-align: center\"><strong>EN<\/strong><\/td>\r\n<td style=\"width: 16.6667%;text-align: center\"><strong>S\u00a0<\/strong><\/td>\r\n<td style=\"width: 16.6667%;text-align: center\"><strong>R<\/strong><\/td>\r\n<td style=\"width: 16.6667%;text-align: center\"><strong>Q<sub>n<\/sub><\/strong><\/td>\r\n<td style=\"width: 16.6667%;text-align: center\"><strong>Q<sub>n+1<\/sub><\/strong><\/td>\r\n<td style=\"width: 16.6667%;text-align: center\"><strong>State<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>0<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>0<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">No Change (NC)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>0<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>0<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">Reset<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>0<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">Set<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>1<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>X<\/p>\r\n<p>X<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">Indeterminate<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>0<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>X<\/p>\r\n<p>X<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>X<\/p>\r\n<p>X<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">\r\n<p>0<\/p>\r\n<p>1<\/p>\r\n<\/td>\r\n<td style=\"width: 16.6667%;text-align: center\">No change (NC)<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p style=\"text-align: center\">Table: Truth table for S R latch with enable input<\/p>\r\n<h2>Excitation Table for SR Flip Flop<\/h2>\r\n<p>During the design process we get to know the sequence of states from the transition table, i.e., the transition from each present state to its corresponding next state. From this information we wish to find the flip flop input conditions that will cause the required transition. For this reason, we need a table that lists the required inputs for a given change of state. Such a table is known as an excitation table of the flip-flop.<\/p>\r\n<p>We can derive the excitation tables for flip flops from their truth tables. The excitation table consists of two columns Q<sub>n<\/sub> and Q<sub>n+1<\/sub> and a column for each input to show how the required transition can be achieved.<\/p>\r\n<p>As shown in the table, there are four possible transitions from the present state to the next state. For each transition, the required input condition is derived from the information available in the truth table.\u00a0<\/p>\r\n<h3>SR Flip Flop Truth Table<\/h3>\r\n<table style=\"border-collapse: collapse;width: 100%\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 33.3333%;text-align: center\"><strong>R<\/strong><\/td>\r\n<td style=\"width: 33.3333%;text-align: center\"><strong>S<\/strong><\/td>\r\n<td style=\"width: 33.3333%;text-align: center\"><strong>Q<sub>n+1<\/sub><\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%;text-align: center\">0<\/td>\r\n<td style=\"width: 33.3333%;text-align: center\">0<\/td>\r\n<td style=\"width: 33.3333%;text-align: center\">Q<sub>n<\/sub><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%;text-align: center\">0<\/td>\r\n<td style=\"width: 33.3333%;text-align: center\">1<\/td>\r\n<td style=\"width: 33.3333%;text-align: center\">1<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%;text-align: center\">1<\/td>\r\n<td style=\"width: 33.3333%;text-align: center\">0<\/td>\r\n<td style=\"width: 33.3333%;text-align: center\">0<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%;text-align: center\">1<\/td>\r\n<td style=\"width: 33.3333%;text-align: center\">1<\/td>\r\n<td style=\"width: 33.3333%;text-align: center\">*<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h3>SR Flip Flop Excitation Table<\/h3>\r\n<table style=\"border-collapse: collapse;width: 100%\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 25%;text-align: center\"><strong>Q<sub>n<\/sub><\/strong><\/td>\r\n<td style=\"width: 25%;text-align: center\"><strong>Q<sub>n+1<\/sub><\/strong><\/td>\r\n<td style=\"width: 25%;text-align: center\"><strong>R<\/strong><\/td>\r\n<td style=\"width: 25%;text-align: center\"><strong>S<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 25%;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;text-align: center\">X<\/td>\r\n<td style=\"width: 25%;text-align: center\">0<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 25%;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;text-align: center\">1<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 25%;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;text-align: center\">0<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 25%;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;text-align: center\">1<\/td>\r\n<td style=\"width: 25%;text-align: center\">0<\/td>\r\n<td style=\"width: 25%;text-align: center\">X<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h4>0 -&gt; 0 <strong>Transition :\u00a0<\/strong><\/h4>\r\n<p>The present state of the flip flop is 0 and is to remain 0 when a clock pulse is applied. Looking at truth table of RS flip-flop\u00a0 we can understand that, this can happen either when R = S = 0 (no change condition) or when R = 1 and S = 0. Thus, S has to be at 0, but R can be at either level. The table indicates this with a &#8220;0&#8221; under S and &#8220;X&#8221; (don&#8217;t care) under R.\u00a0<\/p>\r\n<h4>0-&gt;1 <strong>Transition :<\/strong><\/h4>\r\n<p><strong>\u00a0<\/strong>The present state is 0 and is to change to 1. This can happen only when S = 1 and R = 0 (set condition). Therefore, S has to be 1 and R has to be 0 for this transition to occur.<\/p>\r\n<h4>1-&gt; 0 Transition :<\/h4>\r\n<p>The present state is 1 and is to change to a 0. This can happen only when S = 0 and R = 1(reset condition). Therefore,\u00a0 S has to be 0 and R has to be 1 for this transition to occur.<\/p>\r\n<h4>1-&gt; 1 Transition :<\/h4>\r\n<p>The present state is 1 and is to remain 1. This can happen either when S = 1 and R = 0 (set condition) or when S = 0 and R = 0 (no change condition). Thus, R has to be 0, but S can be at either level. The table indicates this with a &#8220;X&#8221; under S and &#8220;0&#8221; under R.<\/p>\r\n<h3>Problem in SR Flip Flop<\/h3>\r\n<p>There is a problem with this simple SR flip flop. From the truth table, we have seen a condition where the output becomes invalid when both S = R = 1.<\/p>\r\n<p>Therefore, to overcome this issue, <a href=\"https:\/\/dcaclab.com\/blog\/j-k-flip-flop-explained-in-detail\/\">JK flip flop<\/a> was developed.<\/p>\r\n<h2>Applications of SR Flip Flop<\/h2>\r\n<p>Let us discuss the application of flip flop as a key debounce eliminator.<\/p>\r\n<h3>Key Debounce<\/h3>\r\n<p>For interfacing keys to the digital systems, usually push button keys are used. These push button keys when pressed bounces a few times, closing and opening the contacts before proving a steady reading. Reading taken during bouncing period may be faulty. This problem is known as key debounce. The problem of key debounce is undesirable and it must be avoided.<\/p>\r\n<div id=\"attachment_4606\" style=\"width: 266px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4606\" data-attachment-id=\"4606\" data-permalink=\"https:\/\/dcaclab.com\/blog\/sr-flip-flop-explained-in-detail\/osillo1-7\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25162341\/osillo1-6.png?fit=256%2C271&amp;ssl=1\" data-orig-size=\"256,271\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Switch debouncer\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25162341\/osillo1-6.png?fit=256%2C271&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25162341\/osillo1-6.png?fit=256%2C271&amp;ssl=1\" class=\"wp-image-4606 size-full\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25162341\/osillo1-6.png?resize=256%2C271&#038;ssl=1\" alt=\"Switch debouncer\" width=\"256\" height=\"271\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4606\" class=\"wp-caption-text\">Fig: Switch debouncer<\/p><\/div>\r\n<p>One way to avoid this is to use SR latch. The circuit used to avoid keybounce with SR latch is called a <strong>switch or contact debouncer<\/strong>. When key is at position A, the output of SR latch is logic 1, and when key is at position B, the output of SR latch is logic 0. It is important to note that, when key is in between A &amp; B, SR inputs are 00 and hence output does not change, preventing debouncing of key output. In other words, we can say that the output does not change during transition period, eliminating key debounce.<\/p>\r\n<p>&nbsp;<\/p>\r\n<p>&nbsp;<\/p>\r\n<p>&nbsp;<\/p>\r\n<p>AJAY DHEERAJ<\/p>\r\n<p>(Technical Content Developer)<\/p>\r\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Flip &#8211; flops are one of the most fundamental electronic components. These are used as one-bit storage elements, clock dividers, and also we can make counters, shift registers and storing registers by connecting the flip flops in particular sequences. These flip flops use feedback concept to create sequential logic where the previous state affect future [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":4604,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[21],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/03\/25161742\/osillo1-4.png?fit=581%2C256&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9HmdS-1c4","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":4560,"url":"https:\/\/dcaclab.com\/blog\/t-flip-flop-explained-in-detail\/","url_meta":{"origin":4592,"position":0},"title":"T Flip Flop Explained in Detail","date":"December 19, 2019","format":false,"excerpt":"Flip - flops are one of the most fundamental electronic components. These are used as one-bit storage elements, clock dividers and also we can make counters, shift registers and storing registers by connecting the flip flops in particular sequences. These flip flops use feedback concept to create sequential logic where\u2026","rel":"","context":"In &quot;General Electronics&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2019\/12\/10102953\/t3.png?fit=597%2C314&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4573,"url":"https:\/\/dcaclab.com\/blog\/j-k-flip-flop-explained-in-detail\/","url_meta":{"origin":4592,"position":1},"title":"J K Flip Flop Explained in Detail","date":"January 20, 2020","format":false,"excerpt":"Flip - flops are one of the most fundamental electronic components. These are used as one-bit storage elements, clock dividers and also we can make counters, shift registers and storing registers by connecting the flip flops in particular sequences. These flip flops use feedback concept to create sequential logic where\u2026","rel":"","context":"In &quot;General Electronics&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/01\/20202426\/JK1.png?fit=532%2C274&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4638,"url":"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/","url_meta":{"origin":4592,"position":2},"title":"D Flip Flop Explained in Detail","date":"May 13, 2020","format":false,"excerpt":"Flip - flops are one of the most fundamental electronic components. These are used as one-bit storage elements, clock dividers and also we can make counters, shift registers, and storing registers by connecting the flip flops in particular sequences. These flip flops use feedback concept to create sequential logic where\u2026","rel":"","context":"In &quot;General Electronics&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202145\/Document-5_1.jpg?fit=1200%2C532&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":27,"url":"https:\/\/dcaclab.com\/blog\/ic-testing\/","url_meta":{"origin":4592,"position":3},"title":"IC TESTING","date":"December 18, 2017","format":false,"excerpt":"An IC (Integrated Circuit) can not be repaired and neither it had to be since they come in very cheap cost in comparison to the circuitry they contain. The Question arises in front of us is that how to test an ic and when should we throw or replace the\u2026","rel":"","context":"In &quot;Testing&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/dcaclab.com\/blog\/wp-content\/uploads\/2017\/10\/shoring_condition.jpg?fit=382%2C285&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4000,"url":"https:\/\/dcaclab.com\/blog\/keyboard-shortcuts-for-dcaclab\/","url_meta":{"origin":4592,"position":4},"title":"Keyboard Shortcuts for DCACLab","date":"August 16, 2018","format":false,"excerpt":"We have introduces Keyboard Shortcuts for DCACLab so that you can use the online circuit simulator more easily than before. Flip the components Rotate the components Undo and Redo steps Color of Components Color of LED Color of Lamp Bulb Color of Wires Keyboard shortcut to flip the components in\u2026","rel":"","context":"In &quot;Updates&quot;","img":{"alt_text":"color of bulb in dcaclab","src":"https:\/\/i0.wp.com\/dcaclab.com\/blog\/wp-content\/uploads\/2018\/08\/color-of-bulb-1.jpg?fit=570%2C245&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3794,"url":"https:\/\/dcaclab.com\/blog\/how-to-use-battery-in-lab\/","url_meta":{"origin":4592,"position":5},"title":"How to use Battery in Lab","date":"March 10, 2018","format":false,"excerpt":"You have to follow steps in order to use the battery in DCACLab. Steps to use Battery in Lab Step 1: Navigate through the list of the devices\/components and locate the symbol of battery as shown in image below. Step 2:\u00a0Click on the icon of the battery as shown in\u2026","rel":"","context":"In &quot;Lesson&quot;","img":{"alt_text":"how to use battery properties in dcaclab","src":"https:\/\/i0.wp.com\/dcaclab.com\/blog\/wp-content\/uploads\/2018\/03\/how-to-use-battery-properties-in-dcaclab.jpg?fit=773%2C305&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/posts\/4592"}],"collection":[{"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/comments?post=4592"}],"version-history":[{"count":9,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/posts\/4592\/revisions"}],"predecessor-version":[{"id":4650,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/posts\/4592\/revisions\/4650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/media\/4604"}],"wp:attachment":[{"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/media?parent=4592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/categories?post=4592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/tags?post=4592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}