<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Gates on Digital Logic Notebook</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/</link><description>Recent content in Gates 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/gates/index.xml" rel="self" type="application/rss+xml"/><item><title>NOT</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/not/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/not/</guid><description>&lt;h1 id="not"&gt;NOT&lt;a class="anchor" href="#not"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The NOT gate, or inverter, is the simplest logic function: its output is the complement of its input. A high in produces a low out, and a low in produces a high out.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;A&lt;/th&gt;
 &lt;th&gt;NOT A&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="how-its-built"&gt;How It&amp;rsquo;s Built&lt;a class="anchor" href="#how-its-built"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/implementation/cmos/"&gt;CMOS&lt;/a&gt; the inverter is the most economical gate there is — one PMOS transistor pulling the output up and one NMOS pulling it down, two transistors total. A low input turns the PMOS on and pulls the output high; a high input turns the NMOS on and pulls it low. Because exactly one of the two is on in each stable state, no current flows through from supply to ground except briefly during a switch — the reason CMOS logic burns almost no static power.&lt;/p&gt;</description></item><item><title>AND</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/and/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/and/</guid><description>&lt;h1 id="and"&gt;AND&lt;a class="anchor" href="#and"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The AND gate outputs high only when &lt;em&gt;all&lt;/em&gt; of its inputs are high. It is the &amp;ldquo;every condition met&amp;rdquo; gate: the output asserts precisely when nothing is missing.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;A&lt;/th&gt;
 &lt;th&gt;B&lt;/th&gt;
 &lt;th&gt;A AND B&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The physical picture is two switches in &lt;strong&gt;series&lt;/strong&gt;: current reaches the output only when both are closed, which is exactly the behavior first built from &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/before-the-ic/relays/"&gt;relay contacts in series&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>OR</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/or/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/or/</guid><description>&lt;h1 id="or"&gt;OR&lt;a class="anchor" href="#or"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The OR gate outputs high when &lt;em&gt;any&lt;/em&gt; of its inputs is high. It is the &amp;ldquo;at least one condition met&amp;rdquo; gate, and the natural counterpart to AND.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;A&lt;/th&gt;
 &lt;th&gt;B&lt;/th&gt;
 &lt;th&gt;A OR B&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The physical picture is two switches in &lt;strong&gt;parallel&lt;/strong&gt;: current reaches the output if either one is closed — the behavior built from &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/before-the-ic/relays/"&gt;relay contacts in parallel&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>NAND</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/nand/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/nand/</guid><description>&lt;h1 id="nand"&gt;NAND&lt;a class="anchor" href="#nand"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;NAND is AND followed by inversion: the output is low only when &lt;em&gt;all&lt;/em&gt; inputs are high, and high otherwise. That small change — putting a bubble on the AND — turns out to be one of the most important facts in digital logic, because NAND can build everything else.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;A&lt;/th&gt;
 &lt;th&gt;B&lt;/th&gt;
 &lt;th&gt;A NAND B&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="why-nand-is-universal"&gt;Why NAND Is Universal&lt;a class="anchor" href="#why-nand-is-universal"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;NAND is &lt;strong&gt;functionally complete&lt;/strong&gt;: any Boolean function whatsoever can be built from NAND gates alone. An inverter is a NAND with its inputs tied together; an AND is a NAND followed by that inverter; an OR is a NAND with both inputs inverted — which, by &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/boolean-foundations/demorgans-theorems/"&gt;De Morgan&amp;rsquo;s theorems&lt;/a&gt;, a NAND &lt;em&gt;already is&lt;/em&gt; when its inputs are read as inverted. From those, every other gate and every larger function follows. A designer given nothing but NAND gates is not missing anything.&lt;/p&gt;</description></item><item><title>NOR</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/nor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/nor/</guid><description>&lt;h1 id="nor"&gt;NOR&lt;a class="anchor" href="#nor"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;NOR is OR followed by inversion: the output is high only when &lt;em&gt;all&lt;/em&gt; inputs are low, and low if any input is high. Like &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/nand/"&gt;NAND&lt;/a&gt;, it is a universal gate — and it holds a special place in the history of the field.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;A&lt;/th&gt;
 &lt;th&gt;B&lt;/th&gt;
 &lt;th&gt;A NOR B&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="universal-and-the-mirror-of-nand"&gt;Universal, and the Mirror of NAND&lt;a class="anchor" href="#universal-and-the-mirror-of-nand"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;NOR is &lt;strong&gt;functionally complete&lt;/strong&gt;: an inverter is a NOR with its inputs tied together, and every other gate follows. It is the &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/boolean-foundations/demorgans-theorems/"&gt;De Morgan&lt;/a&gt; dual of NAND — a NOR behaves as an AND with inverted inputs — so a design can be built entirely from NOR just as it can be built entirely from NAND. In &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/implementation/cmos/"&gt;CMOS&lt;/a&gt; it is equally native and cheap: four transistors for a two-input gate, where a true &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/or/"&gt;OR&lt;/a&gt; needs six.&lt;/p&gt;</description></item><item><title>XOR</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/xor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/xor/</guid><description>&lt;h1 id="xor"&gt;XOR&lt;a class="anchor" href="#xor"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The exclusive-OR gate outputs high when its inputs &lt;em&gt;differ&lt;/em&gt; and low when they match. Where OR asks &amp;ldquo;is any input high?&amp;rdquo;, XOR asks &amp;ldquo;is exactly an odd number of inputs high?&amp;rdquo; — for two inputs, &amp;ldquo;are they different?&amp;rdquo;&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;A&lt;/th&gt;
 &lt;th&gt;B&lt;/th&gt;
 &lt;th&gt;A XOR B&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="the-difference-detector"&gt;The Difference Detector&lt;a class="anchor" href="#the-difference-detector"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;XOR is fundamentally a &lt;strong&gt;difference detector&lt;/strong&gt;, and two identities make it far more useful than that description suggests:&lt;/p&gt;</description></item><item><title>XNOR</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/xnor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/xnor/</guid><description>&lt;h1 id="xnor"&gt;XNOR&lt;a class="anchor" href="#xnor"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;XNOR is the complement of &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/xor/"&gt;XOR&lt;/a&gt;: its output is high when its inputs &lt;em&gt;match&lt;/em&gt; and low when they differ. If XOR is the difference detector, XNOR is the &lt;strong&gt;equality detector&lt;/strong&gt;.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;A&lt;/th&gt;
 &lt;th&gt;B&lt;/th&gt;
 &lt;th&gt;A XNOR B&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="equality-in-one-gate"&gt;Equality in One Gate&lt;a class="anchor" href="#equality-in-one-gate"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;XNOR answers &amp;ldquo;are these two bits the same?&amp;rdquo; directly — a single gate that is high precisely when A equals B. Because it is XOR inverted, it shares XOR&amp;rsquo;s cost and its complementary identities: &lt;strong&gt;A XNOR 0 = NOT A&lt;/strong&gt; and &lt;strong&gt;A XNOR 1 = A&lt;/strong&gt;, so it too can act as a controlled inverter, just with the opposite sense to XOR.&lt;/p&gt;</description></item><item><title>Schmitt Trigger</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/schmitt-trigger/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/gates/schmitt-trigger/</guid><description>&lt;h1 id="schmitt-trigger"&gt;Schmitt Trigger&lt;a class="anchor" href="#schmitt-trigger"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A Schmitt trigger is not a new logic function — it is usually just an inverter or buffer — but a special &lt;em&gt;input characteristic&lt;/em&gt;: &lt;strong&gt;hysteresis&lt;/strong&gt;. Instead of one switching threshold, it has two, and which one is active depends on which way the input is currently moving. That small change is what lets logic accept slow, noisy, or sloppy signals and still produce clean edges.&lt;/p&gt;
&lt;h2 id="two-thresholds-instead-of-one"&gt;Two Thresholds Instead of One&lt;a class="anchor" href="#two-thresholds-instead-of-one"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An ordinary gate has a single threshold, and any wobble of the input around that level produces a burst of output transitions. A Schmitt-trigger input has an &lt;strong&gt;upper threshold&lt;/strong&gt; (V&lt;sub&gt;T+&lt;/sub&gt;) and a &lt;strong&gt;lower threshold&lt;/strong&gt; (V&lt;sub&gt;T−&lt;/sub&gt;), with a gap between them:&lt;/p&gt;</description></item></channel></rss>