{"id":11863,"date":"2016-01-12T09:15:53","date_gmt":"2016-01-12T17:15:53","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=11863"},"modified":"2025-06-02T04:06:36","modified_gmt":"2025-06-02T11:06:36","slug":"multiplexers-decoders-encoders-and-shifters-in-verilog","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/multiplexers-decoders-encoders-and-shifters-in-verilog\/","title":{"rendered":"Verilog Multiplexers, Decoders, Encoders, and Shifters Explained"},"content":{"rendered":"<p><a href=\"http:\/\/www.instructables.com\/id\/Project-5-Multiplexer-Decoder-Encoder-and-Shifter\/?ALLSTEPS\">This Instructable<\/a> by\u00a0<span class=\"author\"><a href=\"http:\/\/www.instructables.com\/member\/NAEastland\/\" rel=\"author\">NAEastland<\/a>\u00a0shows how to<\/span>\u00a0design a multiplexer, a decoder, an encoder, and a shifter using Verilog HDL. &#8220;Instead of building the circuit using logic operators, you will learn to describe a circuit behaviorally according to the functionality you wish the circuit to perform,&#8221; says Nate.<\/p>\n<p>You&#8217;ll need to have the Vivado WebPACK installed on your computer and to have your FPGA set up. Knowing combinational logic in Verilog is a plus, too.<\/p>\n<figure id=\"attachment_11868\" aria-describedby=\"caption-attachment-11868\" style=\"width: 397px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/binarydecoder.jpg\" rel=\"attachment wp-att-11868\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-11868\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/binarydecoder.jpg\" alt=\"The binary decoder.\" width=\"397\" height=\"271\" data-wp-pid=\"11868\" \/><\/a><figcaption id=\"caption-attachment-11868\" class=\"wp-caption-text\">The binary decoder.<\/figcaption><\/figure>\n<p>Background information on what each item is isn&#8217;t included, but there\u00a0are\u00a0some handy links in the project. First, details for the multiplexer, or mux, are listed. Then, you have to design one! Code it, and then move on to the binary decoder and priority encoder. The shifter is the final item to complete.\u00a0At that point, you can test your knowledge by creating modified variations!<\/p>\n<p>More information and code is available in the Instructable. Check it out and let us know what you think!<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-11863 jlk' data-task='like' data-post_id='11863' data-nonce='3c15ebf169' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-11863 lc'>+1<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-11863 jlk' data-task='unlike' data-post_id='11863' data-nonce='3c15ebf169' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-11863 unlc'>-1<\/span><\/a><\/div><\/div> <div class='status-11863 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Implementing tools in Verilog HDL on an FPGA.<\/p>\n","protected":false},"author":7,"featured_media":11869,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1563,1561],"tags":[1662],"ppma_author":[4464],"class_list":["post-11863","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guide","category-applications","tag-fpga"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/01\/muxesandmore.jpg","authors":[{"term_id":4464,"user_id":7,"is_guest":0,"slug":"amber_mear","display_name":"Amber Mear","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/766b0adee766c4cbe4e5ae38ab97be11?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Mear","last_name_2":"","first_name":"Amber","first_name_2":"","job_title":"","description":"I was the Digilent blog editor, and now I'm a contributor. I love learning about wearables and writing about social issues in STEM. Outside of work, I can be found watching Netflix with my cat, working on an art project, or trying to find new, delicious local foods."}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/11863","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\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=11863"}],"version-history":[{"count":2,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/11863\/revisions"}],"predecessor-version":[{"id":31623,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/11863\/revisions\/31623"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/11869"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=11863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=11863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=11863"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=11863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}