<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Selection on Digital Logic Notebook</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/</link><description>Recent content in Selection on Digital Logic Notebook</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/index.xml" rel="self" type="application/rss+xml"/><item><title>Decoder</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/decoder/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/decoder/</guid><description>&lt;h1 id="decoder"&gt;Decoder&lt;a class="anchor" href="#decoder"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A decoder takes an &lt;em&gt;n&lt;/em&gt;-bit binary code and activates exactly one of its 2ⁿ outputs — the one whose number matches the input. A 3-bit input picks one of eight outputs, a 4-bit input one of sixteen. It turns a compact binary number into a &lt;strong&gt;one-hot&lt;/strong&gt; signal: &amp;ldquo;this specific one, and no other.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="every-output-is-a-minterm"&gt;Every Output Is a Minterm&lt;a class="anchor" href="#every-output-is-a-minterm"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Internally, each output is an &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/and/"&gt;AND&lt;/a&gt; of the input bits in a particular true/complemented combination — output 5 of a 3-to-8 decoder is high only for the input &lt;code&gt;101&lt;/code&gt;. That combination is a &lt;strong&gt;minterm&lt;/strong&gt;, so a decoder generates &lt;em&gt;all&lt;/em&gt; the minterms of its inputs at once. Because any Boolean function is a sum of the minterms where it is true (its &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/boolean-foundations/canonical-forms/"&gt;sum-of-products form&lt;/a&gt;), a decoder plus a single OR gate can build any function of its input variables — which is one reason decoders show up far beyond their obvious use.&lt;/p&gt;</description></item><item><title>Encoder</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/encoder/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/encoder/</guid><description>&lt;h1 id="encoder"&gt;Encoder&lt;a class="anchor" href="#encoder"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;An encoder is the reverse of a &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/decoder/"&gt;decoder&lt;/a&gt;: it takes 2ⁿ inputs, one of them active, and produces the &lt;em&gt;n&lt;/em&gt;-bit binary code that names which one. Eight input lines become a 3-bit number, sixteen become a 4-bit number. Where a decoder expands a code into one-hot, an encoder compresses one-hot back into a code.&lt;/p&gt;
&lt;h2 id="the-problem-of-more-than-one"&gt;The Problem of More Than One&lt;a class="anchor" href="#the-problem-of-more-than-one"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A plain encoder assumes &lt;em&gt;exactly one&lt;/em&gt; input is active. If two are high at once, the naïve output is meaningless — it is neither input&amp;rsquo;s code. Real inputs do not cooperate, so the useful part is the &lt;strong&gt;priority encoder&lt;/strong&gt;: when several inputs are active, it outputs the code of the &lt;strong&gt;highest-priority&lt;/strong&gt; one and ignores the rest, usually flagging separately whether &lt;em&gt;any&lt;/em&gt; input was active at all. The standard parts are the 74148 (8-to-3 priority) and 74147 (10-line-to-4-line BCD priority).&lt;/p&gt;</description></item><item><title>Multiplexer</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/multiplexer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/multiplexer/</guid><description>&lt;h1 id="multiplexer"&gt;Multiplexer&lt;a class="anchor" href="#multiplexer"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A multiplexer (mux) selects one of many inputs and passes it to a single output, chosen by a set of select lines. With &lt;em&gt;n&lt;/em&gt; select lines it picks among 2ⁿ inputs — an 8-to-1 mux needs three. It is the fundamental &lt;strong&gt;data router&lt;/strong&gt;: many sources, one destination, and a control that decides which source gets through.&lt;/p&gt;
&lt;p&gt;The standard parts are the 74151 (8-to-1), 74153 (dual 4-to-1), and 74157 (quad 2-to-1). Internally a mux is a &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/decoder/"&gt;decoder&lt;/a&gt; on the select lines enabling one input path, all &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/or/"&gt;OR&lt;/a&gt;-ed together — select, gate, combine.&lt;/p&gt;</description></item><item><title>Demultiplexer</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/demultiplexer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/demultiplexer/</guid><description>&lt;h1 id="demultiplexer"&gt;Demultiplexer&lt;a class="anchor" href="#demultiplexer"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A demultiplexer (demux) is the reverse of a &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/multiplexer/"&gt;multiplexer&lt;/a&gt;: it takes a single input and routes it to one of many outputs, chosen by the select lines. One source, many destinations, and a control that decides which destination receives the signal while the others stay idle.&lt;/p&gt;
&lt;h2 id="the-same-hardware-as-a-decoder"&gt;The Same Hardware as a Decoder&lt;a class="anchor" href="#the-same-hardware-as-a-decoder"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A demux is not a distinct circuit — it is a &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/selection/decoder/"&gt;decoder&lt;/a&gt; with its enable input used as the data input. The decoder already activates exactly the one output named by the select lines; feed data into its enable and that selected output follows the data instead of simply going active. This is why a part like the 74138 is sold as a &amp;ldquo;decoder/demultiplexer&amp;rdquo;: the two functions are one piece of silicon addressed two ways. When the input is held permanently active it is a decoder; when the input carries data it is a demux.&lt;/p&gt;</description></item></channel></rss>