<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Storage on Digital Logic Notebook</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/</link><description>Recent content in Storage 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/storage/index.xml" rel="self" type="application/rss+xml"/><item><title>SR Latch</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/sr-latch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/sr-latch/</guid><description>&lt;h1 id="sr-latch"&gt;SR Latch&lt;a class="anchor" href="#sr-latch"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The SR (set-reset) latch is the simplest memory element, and it is the seed from which every latch, flip-flop, and register grows. Cross-couple two gates so that each one&amp;rsquo;s output feeds back into the other&amp;rsquo;s input, and the pair becomes &lt;strong&gt;bistable&lt;/strong&gt;: it has two stable states and will rest in whichever one it was last driven into, holding that state after the driving input is removed. That feedback loop is what &amp;ldquo;remembering&amp;rdquo; means in hardware.&lt;/p&gt;</description></item><item><title>D Latch</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/d-latch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/d-latch/</guid><description>&lt;h1 id="d-latch"&gt;D Latch&lt;a class="anchor" href="#d-latch"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The D latch fixes the two awkward things about the raw &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/sr-latch/"&gt;SR latch&lt;/a&gt;: its forbidden state, and its lack of any control over &lt;em&gt;when&lt;/em&gt; it listens. It does this by adding a single data input &lt;strong&gt;D&lt;/strong&gt; and an &lt;strong&gt;enable&lt;/strong&gt;, arranged so that set and reset can never be asserted at the same time.&lt;/p&gt;
&lt;h2 id="transparent-when-enabled"&gt;Transparent When Enabled&lt;a class="anchor" href="#transparent-when-enabled"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Steering logic drives the internal set/reset from D and its complement, gated by the enable. The result is simple to state:&lt;/p&gt;</description></item><item><title>D Flip-Flop</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/d-flip-flop/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/d-flip-flop/</guid><description>&lt;h1 id="d-flip-flop"&gt;D Flip-Flop&lt;a class="anchor" href="#d-flip-flop"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The D flip-flop is the workhorse of sequential logic — the element behind essentially every register, counter, shift register, state machine, and pipeline stage in a modern design. It stores one bit, and it captures that bit at a single, well-defined instant: the clock edge.&lt;/p&gt;
&lt;h2 id="edge-triggered-not-level-sensitive"&gt;Edge-Triggered, Not Level-Sensitive&lt;a class="anchor" href="#edge-triggered-not-level-sensitive"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is the one distinction that matters. A &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/d-latch/"&gt;D latch&lt;/a&gt; is transparent — its output follows D the whole time it is enabled. A D flip-flop instead samples D &lt;strong&gt;only at the rising (or falling) edge of the clock&lt;/strong&gt; and holds that value for the entire cycle until the next edge, ignoring anything D does in between.&lt;/p&gt;</description></item><item><title>JK Flip-Flop</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/jk-flip-flop/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/jk-flip-flop/</guid><description>&lt;h1 id="jk-flip-flop"&gt;JK Flip-Flop&lt;a class="anchor" href="#jk-flip-flop"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The JK flip-flop is the &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/sr-latch/"&gt;SR latch&lt;/a&gt;&amp;rsquo;s clocked, well-behaved descendant — and, for the discrete-logic era, its most versatile one. It takes SR&amp;rsquo;s set and reset inputs (here called J and K) but replaces the forbidden &amp;ldquo;both asserted&amp;rdquo; combination with something useful: &lt;strong&gt;toggle&lt;/strong&gt;.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;J&lt;/th&gt;
 &lt;th&gt;K&lt;/th&gt;
 &lt;th&gt;Q (next)&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;Q — hold&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 — set&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 — reset&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;Q̄ — toggle&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;With J and K both high, each clock edge flips the output. That closes the one gap SR left open and makes a single flip-flop able to hold, set, reset, or toggle depending only on how its inputs are wired.&lt;/p&gt;</description></item><item><title>T Flip-Flop</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/t-flip-flop/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/t-flip-flop/</guid><description>&lt;h1 id="t-flip-flop"&gt;T Flip-Flop&lt;a class="anchor" href="#t-flip-flop"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The T (toggle) flip-flop does one thing: when its T input is high, it flips state on every clock edge; when T is low, it holds. That single behavior makes it the building block of counters and frequency dividers.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;T&lt;/th&gt;
 &lt;th&gt;Q (next)&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;Q — hold&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;1&lt;/td&gt;
 &lt;td&gt;Q̄ — toggle&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="divide-by-two"&gt;Divide by Two&lt;a class="anchor" href="#divide-by-two"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A flip-flop that toggles on each clock edge produces an output that changes half as often as its clock — a &lt;strong&gt;divide-by-two&lt;/strong&gt;. Feed that output into the clock of a second toggle stage and it divides by two again; chain &lt;em&gt;n&lt;/em&gt; stages and the result counts in binary and divides the input frequency by 2ⁿ. That is precisely how a &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/counting/ripple-counters/"&gt;ripple counter&lt;/a&gt; works, and why the T flip-flop lives at the root of the &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/counting/"&gt;counting&lt;/a&gt; primitives.&lt;/p&gt;</description></item><item><title>Registers</title><link>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/registers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/registers/</guid><description>&lt;h1 id="registers"&gt;Registers&lt;a class="anchor" href="#registers"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A register is simply a row of &lt;a href="https://applied-ee.github.io/digital-logic-notebook/docs/building-blocks/storage/d-flip-flop/"&gt;D flip-flops&lt;/a&gt; sharing one clock, storing an N-bit word instead of a single bit. Where a flip-flop remembers a bit, a register remembers a &lt;em&gt;number&lt;/em&gt; — and that makes it the basic unit of storage in any datapath.&lt;/p&gt;
&lt;h2 id="a-word-captured-on-a-clock"&gt;A Word, Captured on a Clock&lt;a class="anchor" href="#a-word-captured-on-a-clock"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Present a word at the register&amp;rsquo;s inputs, pulse the clock, and all N bits are captured together and held until the next clock — the same edge-triggered capture as a single flip-flop, widened. Because every bit latches on the same edge, the stored word is always internally consistent; there is no moment where half the bits are old and half are new. The classic octal parts are the 74HC574 and 74HC377 (eight D flip-flops with a shared clock, the latter with a load enable).&lt;/p&gt;</description></item></channel></rss>