Read this lesson as text

Memory and Registers

Discrete Math · Axiom Academy

Building computer memory from logic gates: from flip-flops to registers, shift registers, and RAM at the gate level. 1. The Flip-Flop: Memory's Foundation A flip-flop is the simplest memory element—it stores one bit (0 or 1). The most common type is the D flip-flop (Data flip-flop), which captures input on a clock edge. A register is a collection of flip-flops that work together to store multiple bits. An 8-bit register uses 8 D flip-flops, all sharing the same clock signal. 3. Shift Registers: Moving Data A shift register connects flip-flops in series: each flip-flop's output feeds the next one's input. Data shifts one position on each clock cycle. 4. Building RAM: Addressable Memory Random Access Memory (RAM) consists of many registers with addressing logic. An address selects which register to read from or write to, enabling storage of multiple words. 5. Timing Analysis and Critical Path Real circuits aren't instantaneous. Timing analysis ensures signals propagate through gates fast enough to meet clock requirements. The critical path is the slowest path through the circuit, determining maximum clock speed. t prop : Propagation delay through gates (signal travel time) t setup : Data must be stable before clock edge t hold : Data must remain stable after clock edge t clk-to-q : Delay from clock edge to flip-flop output change

This is the written version of the interactive lesson above. See the full Discrete Math course.