Course contentsShow
← Embedded Systems & Computer Architecture
Lesson 13 of 9361. Foundations of Digital Logic and Computer ArchitectureFree lesson

Latches and Bistable Storage Elements

You will analyze how cross-coupled logic gates create bistable circuits capable of storing a single bit of binary information.

In this lesson, you will learn how to build a "memory cell" using only standard logic gates that can hold onto a bit of information indefinitely.

The Problem with Combinational Logic

Everything we have built so far—adders, multiplexers, and decoders—is combinational. The output depends solely on the current inputs. If you remove the input, the output vanishes. To build a computer, we need sequential circuits: circuits that "remember" their previous state even after the inputs change.

The Feedback Loop

The secret to memory is feedback. Imagine taking two NOR gates and connecting the output of each to one of the inputs of the other. This is called a cross-coupled pair.

Let's look at the logic flow:

Q  = NOT (R OR Q_bar)
Q_bar = NOT (S OR Q)

In this setup, the output Q is fed back into the input of the gate creating Q_bar, and vice-versa. Because these gates are "locked" together, the circuit enters a bistable state.

  1. Stability: If Q is 1, it forces Q_bar to be 0 (because of the NOR gate logic). Because Q_bar is 0, the first gate sees 0 and 0 as inputs, which keeps Q at 1. It reinforces itself!
  2. Persistence: Because the output is fed back to the input, the circuit doesn't need external help to stay in its current state. It is trapped in a stable loop of 1s and 0s.

Why "Bistable"?

A bistable element has two stable equilibrium points: Q=1 (and Q_bar=0) or Q=0 (and Q_bar=1). We can "set" the circuit to 1 or "reset" it to 0 by briefly pulsing the external inputs. Once the pulse is removed, the cross-coupling ensures the circuit stays in that state. This is the fundamental building block of static memory—the "1-bit" of data that forms the heart of all registers and internal storage in your processor.

Key Takeaway: By creating a feedback loop between two logic gates, we create a bistable circuit that maintains its state indefinitely, effectively allowing hardware to "remember" binary information.