{"id":11926,"date":"2016-01-27T20:00:33","date_gmt":"2016-01-28T04:00:33","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=11926"},"modified":"2024-12-28T11:38:09","modified_gmt":"2024-12-28T19:38:09","slug":"what-is-sequential-logic","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/what-is-sequential-logic\/","title":{"rendered":"What Is Sequential Logic: Sequential vs Combinational"},"content":{"rendered":"<p>In previous posts, we have talked about <a href=\"https:\/\/digilent.com\/blog\/index.php\/logic-gates\/\">logic gates<\/a>, what they are, <a href=\"https:\/\/digilent.com\/blog\/index.php\/building-logic-gates-with-transistors\/\">how you physically build them<\/a>, and <a href=\"https:\/\/digilent.com\/blog\/index.php\/coding-logic-gates\/\">how you can code them<\/a>. These logic gates; NOT, OR, AND, NOR, NAND, XOR, XNOR,\u00a0and their combinations are all examples of combinational\u00a0logic. That is, logic that only depends on the current value of inputs based on what A, B through N inputs are you can get a logical output.<\/p>\n<p>Sequential logic works differently. Sequential logic depends on not only the current value of the inputs, but also on the past values of\u00a0the inputs. It relies on a register to store a current state. This current state is the result of a history of inputs. Based on this current state and inputs the next state can be found. A good example of this is a volume\u00a0knob that turns continuously. Since you can turn the knob continuously, there are\u00a0no set turn angles for each volume level. Rather the next volume level is determined by the current volume level and the amount you turn the knob.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11950\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andcompare.png\" alt=\"andcompare\" width=\"1525\" height=\"388\" data-wp-pid=\"11950\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andcompare.png 1525w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andcompare-600x153.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andcompare-768x195.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andcompare-1024x261.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andcompare-800x204.png 800w\" sizes=\"auto, (max-width: 1525px) 100vw, 1525px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>If you wanted to turn a combinational\u00a0logic into sequential logic, you could add a feedback loop. For example, say you have a two input and gate and you feedback the output to one of the inputs. Now the output depends not only on the input, but also the current state.<\/p>\n<figure id=\"attachment_11946\" aria-describedby=\"caption-attachment-11946\" style=\"width: 782px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-11946\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andwithfeedback.png\" alt=\"An and gate with added feedback, turning it into sequential logic. \" width=\"782\" height=\"294\" data-wp-pid=\"11946\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andwithfeedback.png 782w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andwithfeedback-600x226.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/andwithfeedback-768x289.png 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><figcaption id=\"caption-attachment-11946\" class=\"wp-caption-text\">An AND\u00a0gate with added feedback, turning it into sequential logic.<\/figcaption><\/figure>\n<p>Sequential logic is used to create something called a state machine. To read more about state machines, stay tuned for my next post.<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-11926 jlk' data-task='like' data-post_id='11926' data-nonce='1c819b3974' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-11926 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-11926 jlk' data-task='unlike' data-post_id='11926' data-nonce='1c819b3974' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-11926 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-11926 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Learn about the differences between combinational and sequential logic here!<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1563],"tags":[],"ppma_author":[4466],"class_list":["post-11926","post","type-post","status-publish","format-standard","hentry","category-guide"],"jetpack_featured_media_url":"","authors":[{"term_id":4466,"user_id":18,"is_guest":0,"slug":"kaitlyn","display_name":"Kaitlyn Franz","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/9276021eaa44781ce19f364cfca46ada25e1500769cf4803a095a5bae83c912a?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/11926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=11926"}],"version-history":[{"count":1,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/11926\/revisions"}],"predecessor-version":[{"id":31148,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/11926\/revisions\/31148"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=11926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=11926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=11926"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=11926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}