0%

# Sequential Logic

Combinational chips compute functions that depend solely on combinations of their input values. These relatively simple chips provide many important processing functions (like the ALU), but they cannot maintain state. Since computers must be able to not only compute values but also store and recall values, they must be equipped with memory elements that can preserve data over time. These memory elements are built from sequential chips.

## Flip-Flop

• the DFF has a clock input that continuously changes according to the master clock’s signal.
• 1-bit input, 1-bit output
• The gate outputs its previous input:

$out(t)=in(t-1)$

• Implementation: a gate that can flip between two stable states: remembering 0, or remembering 1
• Gates that feature this behavior are called data flip-flops.

## 1-bit register

A single-bit register, which we call Bit, or binary cell, is designed to store a single bit of information (0 or 1). The chip interface consists of

• an input pin that carries a data bit;
• a load pin that enables the cell for writes;
• an output pin that emits the current state of the cell

• Read: To read the contents of a register, we simply probe its output.
• Write: To write a new data value d into a register, we put d in the in input and assert (set to 1) the load input. In the next clock cycle, the register commits to the new data value, and its output starts emitting d.

## Multi-bit register (also known as “register”)

A w-bit register can be created from an array of w 1-bit registers.

## Random Access Memory (RAM)

1. Architecture A sequence of n addressable registers, with addresses 0 to n-1

2. The number of registers (n) and the width of each register (w) are called the memory’s size and width

3. Address width $k = log_2 n$

• probe out
5. To set Register i to v: