{"id":4638,"date":"2020-05-13T20:56:57","date_gmt":"2020-05-13T18:56:57","guid":{"rendered":"https:\/\/dcaclab.com\/blog\/?p=4638"},"modified":"2020-05-13T21:07:40","modified_gmt":"2020-05-13T19:07:40","slug":"d-flip-flop-explained-in-detail","status":"publish","type":"post","link":"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/","title":{"rendered":"D Flip Flop Explained in Detail"},"content":{"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 states (unlike combinational circuit).<\/p>\n<p>The common types of flip flops are as follows:<\/p>\n<ul>\n<li><a href=\"https:\/\/dcaclab.com\/blog\/sr-flip-flop-explained-in-detail\/\">S-R Flip Flop (Reset-set)<\/a><\/li>\n<li><a href=\"https:\/\/dcaclab.com\/blog\/j-k-flip-flop-explained-in-detail\/\">J-K Flip Flop (Jack-Kilby)<\/a><\/li>\n<li>D Flip Flop (Data)<\/li>\n<li><a href=\"https:\/\/dcaclab.com\/blog\/t-flip-flop-explained-in-detail\/\">T Flip Flop<\/a> (Toggle)<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">The D in the D flip flop represents the data (generation, processing, or storing) in the form of states. The two states are binary, 0 (Low) and 1 (High), set or reset, positive or non-positive.<\/span><\/p>\n<p><span style=\"font-weight: 400\">So, let us discuss the latches (Flip flop) first. The latches are as Bistable Multivibrator as two stable states. And of course, these circuits are triggered by Low or High signals.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Well, you must get a question in mind!!<\/span><\/p>\n<p><span style=\"font-weight: 400\">Why do we need D flip flops? Think!<\/span><\/p>\n<p><span style=\"font-weight: 400\">The answer is pretty much simple, though. This is because of the disadvantage of the basic SR NAND gate Bistable circuit. It gives an invalid state when both set and reset are \u20180\u2019 (active Low).<\/span><\/p>\n<h2><span style=\"font-weight: 400\">D Latch<\/span><\/h2>\n<div id=\"attachment_4640\" style=\"width: 235px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4640\" data-attachment-id=\"4640\" data-permalink=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/document-5_2\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202148\/Document-5_2.jpg?fit=1257%2C1027&amp;ssl=1\" data-orig-size=\"1257,1027\" 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=\"Document 5_2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202148\/Document-5_2.jpg?fit=300%2C245&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202148\/Document-5_2.jpg?fit=1024%2C837&amp;ssl=1\" class=\"wp-image-4640\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202148\/Document-5_2.jpg?resize=225%2C184&#038;ssl=1\" alt=\"\" width=\"225\" height=\"184\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4640\" class=\"wp-caption-text\">Fig:Logic Symbol<\/p><\/div>\n<p><span style=\"font-weight: 400\">Looking at the truth table of the SR latch we can realize that when both inputs are the same, the output either does not change or it is invalid (Inputs = 00, no change and inputs = 11, invalid). In many of the practical applications, these input conditions are not required. These inputs condition can be avoided by making them complement of each other. This modified version of SR latch is known as D latch.<\/span><\/p>\n<div id=\"attachment_4639\" style=\"width: 2122px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4639\" data-attachment-id=\"4639\" data-permalink=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/document-5_1\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202145\/Document-5_1.jpg?fit=2112%2C936&amp;ssl=1\" data-orig-size=\"2112,936\" 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=\"D latch\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;D latch&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202145\/Document-5_1.jpg?fit=300%2C133&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202145\/Document-5_1.jpg?fit=1024%2C454&amp;ssl=1\" class=\"wp-image-4639 size-full\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202145\/Document-5_1.jpg?resize=2112%2C936&#038;ssl=1\" alt=\"\" width=\"2112\" height=\"936\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4639\" class=\"wp-caption-text\">Fig:D latch<\/p><\/div>\n<p><span style=\"font-weight: 400\">The above figure shows the D latch. The NAND gates 1, 2, 3, and 4 form the basic SR latch with enable input. The use of the fifth NAND gate is to provide the complemented inputs.<\/span><\/p>\n<p><span style=\"font-weight: 400\">As shown in fig, D input goes directly to the S input, and its complement is applied to the R input, through gate 5. Thus, only two input conditions exists, either S = 0 and R = 1 or S = 1 and R = 0. The truth table for D latch is as shown in the below table.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Truth Table for D latch<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><b>EN<\/b><\/td>\n<td style=\"text-align: center\"><b>D<\/b><\/td>\n<td style=\"text-align: center\"><b>Q<\/b><b>n<\/b><\/td>\n<td style=\"text-align: center\"><b>Q<\/b><b>n+1<\/b><\/td>\n<td style=\"text-align: center\"><b>Stable<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">X<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">Reset<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">X<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">Set<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">X<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">X<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">Q<\/span><span style=\"font-weight: 400\">n<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">No change (NC)<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">As shown in the truth table, the Q output follows the D input. For this reason, D latch is sometimes called a transparent latch.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Looking at the truth table for D latch with enable input and simplifying Q<\/span><span style=\"font-weight: 400\">n+1<\/span><span style=\"font-weight: 400\"> function by k-map we get the characteristic equation for D latch with enable input as\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Q<\/span><span style=\"font-weight: 400\">n+1<\/span><span style=\"font-weight: 400\"> = EN * D + (EN)\u2019 * Q<\/span><span style=\"font-weight: 400\">n<\/span><span style=\"font-weight: 400\">.\u00a0<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Clocked D Flip-Flop<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Like in D latch, in D flip-flop also, the basic SR flip flop is used with complemented inputs. The D flip flop is similar to D latch except clock pulse followed by edge detector is used instead of enable input. Such an edge-triggered D flip flop can be of two types:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Positive edge-triggered D flip flop<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Negative edge-triggered D flip flop<\/span><\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400\">Positive Edge Triggered D flip flop<\/span><\/h3>\n<p><span style=\"font-weight: 400\">It consists of a gated D latch and a positive edge detector circuit. As shown in the truth table below, the circuit output responds to the D input only at the positive edges of the clock pulse. At any other instants of time, the D flip flop will not respond to the changes in input.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><b>CP<\/b><\/td>\n<td style=\"text-align: center\"><b>D<\/b><\/td>\n<td style=\"text-align: center\"><b>Q<\/b><b>n+1<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">I<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">I<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">X<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">Q<\/span><span style=\"font-weight: 400\">n<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">Looking at the truth table for the D flip flop we can realize that Q<\/span><span style=\"font-weight: 400\">n+1<\/span><span style=\"font-weight: 400\"> function follows D input at the positive-going edges of the clock pulses. Hence the characteristic equation for D flip flop is\u00a0 Q<\/span><span style=\"font-weight: 400\">n+1<\/span><span style=\"font-weight: 400\"> = D. However, the output Q<\/span><span style=\"font-weight: 400\">n+1<\/span><span style=\"font-weight: 400\"> is delayed by one clock period. Thus, D flip flop is also known as delay flip &#8211; flop.<\/span><\/p>\n<div id=\"attachment_4641\" style=\"width: 2896px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4641\" data-attachment-id=\"4641\" data-permalink=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/document-5_5\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202152\/Document-5_5.jpg?fit=2886%2C996&amp;ssl=1\" data-orig-size=\"2886,996\" 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=\"Positive edge triggered D flip flop\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Positive edge triggered D flip flop&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202152\/Document-5_5.jpg?fit=300%2C104&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202152\/Document-5_5.jpg?fit=1024%2C353&amp;ssl=1\" class=\"size-full wp-image-4641\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202152\/Document-5_5.jpg?resize=2886%2C996&#038;ssl=1\" alt=\"\" width=\"2886\" height=\"996\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4641\" class=\"wp-caption-text\">Fig: Positive edge-triggered D flip flop<\/p><\/div>\n<div id=\"attachment_4643\" style=\"width: 1317px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4643\" data-attachment-id=\"4643\" data-permalink=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/document-5_7\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202157\/Document-5_7.jpg?fit=1307%2C750&amp;ssl=1\" data-orig-size=\"1307,750\" 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=\"Input and output waveforms of clocked D flip flop\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Fig: Input and output waveforms of clocked D flip flop&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202157\/Document-5_7.jpg?fit=300%2C172&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202157\/Document-5_7.jpg?fit=1024%2C588&amp;ssl=1\" class=\"size-full wp-image-4643\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202157\/Document-5_7.jpg?resize=1307%2C750&#038;ssl=1\" alt=\"\" width=\"1307\" height=\"750\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4643\" class=\"wp-caption-text\">Fig: Input and output waveforms of clocked D flip flop<\/p><\/div>\n<p><span style=\"font-weight: 400\">If we connect the Q\u2019 output of D flip flop to its D input, the output of D flip flop will change either from 0 to 1 or from 1 to 0 at every positive edge of the D flip flop. Such a change in the output is known as toggling of the flip flop output.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">Negative Edge Triggered D Flip Flop<\/span><\/h3>\n<p><span style=\"font-weight: 400\">In the above explanation, we have seen the output of D flip flop is sensitive at the positive edge of the clock input. In the case of negative edge triggering, the output is sensitive at the negative edge of the clock input.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><b>CP<\/b><\/td>\n<td style=\"text-align: center\"><b>D<\/b><\/td>\n<td style=\"text-align: center\"><b>Q<\/b><b>n+1<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">I<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">I<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">X<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">Q<\/span><span style=\"font-weight: 400\">n<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">The above truth table is for negative edge triggered D flip flop. Also, the input and output waveforms for negative edge triggered flip flop is as shown below:<\/span><\/p>\n<div id=\"attachment_4642\" style=\"width: 2475px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4642\" data-attachment-id=\"4642\" data-permalink=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/document-5_6\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202154\/Document-5_6.jpg?fit=2465%2C780&amp;ssl=1\" data-orig-size=\"2465,780\" 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=\"Input and output waveforms of negative edge D flip flop\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Fig: Input and output waveforms of negative edge D flip flop&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202154\/Document-5_6.jpg?fit=300%2C95&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202154\/Document-5_6.jpg?fit=1024%2C324&amp;ssl=1\" class=\"size-full wp-image-4642\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13202154\/Document-5_6.jpg?resize=2465%2C780&#038;ssl=1\" alt=\"\" width=\"2465\" height=\"780\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4642\" class=\"wp-caption-text\">Fig: Input and output waveforms of negative edge D flip flop<\/p><\/div>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<h2><span style=\"font-weight: 400\">D Flip Flop Excitation Table<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><b>Q<\/b><b>n<\/b><\/td>\n<td style=\"text-align: center\"><b>Q<\/b><b>n+1<\/b><\/td>\n<td style=\"text-align: center\"><b>D<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-size: inherit\">Table: D Excitation Table<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><b>D<\/b><\/td>\n<td style=\"text-align: center\"><b>Q<\/b><b>n+1<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<td style=\"text-align: center\"><span style=\"font-weight: 400\">1<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-size: inherit\">Table: D Truth Table<\/span><\/p>\n<p><span style=\"font-weight: 400\">The above tables show the excitation table and truth table for D flip flop, respectively. In D flip flop, the next state is independent of the present state and is always equal to the D input. Therefore, D must be 0 if Q<\/span><span style=\"font-weight: 400\">n+1<\/span><span style=\"font-weight: 400\"> has to be 0, and 1 if Q<\/span><span style=\"font-weight: 400\">n+1<\/span><span style=\"font-weight: 400\"> has to be 1, regardless of the value of Q<\/span><span style=\"font-weight: 400\">n<\/span><span style=\"font-weight: 400\">.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Now, if we look for an improved version of this D flip flop then, of course, we can achieve it. We will add a second S R flip flop to its output. Let\u2019s see how it improves performance.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">The Master-Slave D Flip Flop<\/span><\/h2>\n<p><span style=\"font-weight: 400\">As said above, a second SR flip flop will be added to the output of the basic D type flip flop. It activates on the complementary clock signal to produce the \u201cMaster-Slave D flip flop\u201d. At the first stage (clock signal going from Low to High) the Master latches the input condition at D whereas the output stage is deactivated.<\/span><\/p>\n<p><span style=\"font-weight: 400\">At the second stage (clock signal going from High to Low), the slave stage activates. Slave latches on to the output from the first master circuit. This makes the output stage trigger on the negative edge of the clock pulse. This Master-Slave D flip flop is constructed by cascading the two latches having opposite phases. This is shown below.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">The Master-Slave D Flip Flop Circuit<\/span><\/h3>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><span style=\"font-weight: 400\">As we are seeing in the figure, Master D flip flop gets the data from D input on the leading edge of the clock pulse (signal going from Low to High). Therefore, the master is \u2018ON\u2019 now. Similarly, on the trailing edge of the clock pulse (signal from High to Low), the slave flip flop loads data, i.e., the slave gets \u2018ON\u2019.<\/span><\/p>\n<div id=\"attachment_4646\" style=\"width: 352px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4646\" data-attachment-id=\"4646\" data-permalink=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/master-slave-d-flip-flop\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204445\/Master-slave-D-flip-flop.png?fit=342%2C151&amp;ssl=1\" data-orig-size=\"342,151\" 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=\"Master-slave D flip flop\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Fig: Master-slave D flip flop&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204445\/Master-slave-D-flip-flop.png?fit=300%2C132&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204445\/Master-slave-D-flip-flop.png?fit=342%2C151&amp;ssl=1\" class=\"size-full wp-image-4646\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204445\/Master-slave-D-flip-flop.png?resize=342%2C151&#038;ssl=1\" alt=\"\" width=\"342\" height=\"151\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4646\" class=\"wp-caption-text\">Fig: Master-slave D flip flop<\/p><\/div>\n<p><span style=\"font-weight: 400\">Thus, there will always be one flip flop of the master or slave which would be ON and the other would be OFF at one time. This will make output Q acquire the value of D only when one full complete pulse (0-1-0) is applied at the clock input.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Applications of D Flip Flop\u00a0<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Now, after we know how this flip flop works, we must know that what we can do with this.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Don\u2019t you think that whatever we study has some application else why would we study all these?<\/span><\/p>\n<p><span style=\"font-weight: 400\">There are various applications of D flip flops. Let us explore some which are listed below:<\/span><\/p>\n<h3><span style=\"font-weight: 400\">D type Flip Flop for Frequency Division<\/span><\/h3>\n<p><span style=\"font-weight: 400\">This is one of the main use of D flip flop. If we connect the Q\u2019 output of the D type flip flop directly to the D input making the closed-loop feedback. The successive clock pulses would make the bistable toggle one time for every two clock cycles.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Data latch is used as a binary divider or a frequency divider. It produces a divide by 2 counter circuits, i.e., the output frequency will have half the frequency that of the clock pulses.<\/span><\/p>\n<p><span style=\"font-weight: 400\">One more interesting thing that happens here is that we can construct a T type flip flop which can be used as a divide by 2 circuits in binary counter.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">Divide-by-2 Counter<\/span><\/h3>\n<div class=\"mceTemp\"><\/div>\n<div id=\"attachment_4645\" style=\"width: 578px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4645\" data-attachment-id=\"4645\" data-permalink=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/divide-by-2-counter\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204444\/Divide-by-2-counter.png?fit=568%2C356&amp;ssl=1\" data-orig-size=\"568,356\" 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=\"Divide-by-2 counter\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Fig: Divide-by-2 counter&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204444\/Divide-by-2-counter.png?fit=300%2C188&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204444\/Divide-by-2-counter.png?fit=568%2C356&amp;ssl=1\" class=\"size-full wp-image-4645\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204444\/Divide-by-2-counter.png?resize=568%2C356&#038;ssl=1\" alt=\"\" width=\"568\" height=\"356\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4645\" class=\"wp-caption-text\">Fig: Divide-by-2 counter<\/p><\/div>\n<p><span style=\"font-weight: 400\">From the above frequency waveform, by connecting (feedback) the output Q\u2019 to the input terminal D, the output pulses at Q has a frequency which is exactly half to that of the input clock frequency (f<\/span><span style=\"font-weight: 400\">in<\/span><span style=\"font-weight: 400\">). Therefore, we can say that the circuit is producing frequency division. It is dividing the frequency by a factor of 2, once for every two clock cycles.\u00a0<\/span><\/p>\n<h3><span style=\"font-weight: 400\">Transparent Data Latch<\/span><\/h3>\n<p><span style=\"font-weight: 400\">The data latch is a useful device in computer and electronic circuits. It is designed in such a way to have a very high impedance at both the outputs Q and its inverse Q\u2019. This reduces the impedance effect on the connecting circuit. For example, when it is used as a buffer, bi-directional bus driver, a buffer, or even a display driver.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Now, it is obvious that a one-bit transparent latch is not useful practically. In fact commercial chips incorporate 4, 8, 10, 16, or 32 individual data latches into one single IC package (example: 74LS373 Octal D type transparent latch).<\/span><\/p>\n<p><span style=\"font-weight: 400\">Let us understand the above explanation in an easier way. For instance, consider we have 8 individual data latches. Therefore, when the clock pulse is High (Logic 1) then the output Q will follow the D input. So, whatever we give at D, comes as output from Q, thus it acts as a buffer.<\/span><\/p>\n<h4><span style=\"font-weight: 400\">4 &#8211; bit Data Latch<\/span><\/h4>\n<div id=\"attachment_4644\" style=\"width: 436px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4644\" data-attachment-id=\"4644\" data-permalink=\"https:\/\/dcaclab.com\/blog\/d-flip-flop-explained-in-detail\/4-bit-d-latch\/\" data-orig-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204442\/4-bit-D-latch.png?fit=426%2C313&amp;ssl=1\" data-orig-size=\"426,313\" 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=\"4-bit D latch\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Fig: 4-bit D latch&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204442\/4-bit-D-latch.png?fit=300%2C220&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204442\/4-bit-D-latch.png?fit=426%2C313&amp;ssl=1\" class=\"wp-image-4644 size-full\" src=\"https:\/\/i0.wp.com\/s3.amazonaws.com\/dcaclab.wordpress\/wp-content\/uploads\/2020\/05\/13204442\/4-bit-D-latch.png?resize=426%2C313&#038;ssl=1\" alt=\"\" width=\"426\" height=\"313\" data-recalc-dims=\"1\" \/><p id=\"caption-attachment-4644\" class=\"wp-caption-text\">Fig: 4-bit D latch<\/p><\/div>\n<p><span style=\"font-weight: 400\">It is the same as explained above. The individual latches will be clubbed together to form the 4-bit data latch. Therefore, as we give data at individual D inputs we can parallelly take the same output from Q.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">Some Applications of Flip Flops<\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">It is used as delay elements.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Flip flops are used as memory elements.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">It eliminates key debounce.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Flip flops are the basic building block in sequential circuits such as registers and counters.\u00a0<\/span><\/li>\n<\/ul>\n<p>AJAY DHEERAJ<br \/>\n(Technical Content Developer)<\/p>\n","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":4639,"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\/05\/13202145\/Document-5_1.jpg?fit=2112%2C936&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9HmdS-1cO","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":4560,"url":"https:\/\/dcaclab.com\/blog\/t-flip-flop-explained-in-detail\/","url_meta":{"origin":4638,"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":4638,"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":4592,"url":"https:\/\/dcaclab.com\/blog\/sr-flip-flop-explained-in-detail\/","url_meta":{"origin":4638,"position":2},"title":"SR Flip Flop Explained in Detail","date":"March 25, 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\/03\/25161742\/osillo1-4.png?fit=581%2C256&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":27,"url":"https:\/\/dcaclab.com\/blog\/ic-testing\/","url_meta":{"origin":4638,"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":4638,"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":4638,"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\/4638"}],"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=4638"}],"version-history":[{"count":3,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/posts\/4638\/revisions"}],"predecessor-version":[{"id":4653,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/posts\/4638\/revisions\/4653"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/media\/4639"}],"wp:attachment":[{"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/media?parent=4638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/categories?post=4638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dcaclab.com\/blog\/wp-json\/wp\/v2\/tags?post=4638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}