Skip to content
LearnTronics menu

LearnTronics

State and Memory — When Logic Remembers

Tutorial Index

Until now, the circuits had no memory

Most of the logic considered so far has been combinational logic: the output depends only on the inputs that exist right now.

COMBINATIONAL current inputs → logic → output Output depends only on what the inputs are now. WITH MEMORY / STATE current inputs + previous state → next output Past events can affect what happens next. A circuit with state can remember.

A circuit with memory is different

Suppose a START button is pressed and then released, but the machine continues to run. The circuit must somehow remember that START happened.

That remembered condition is called its state.

Another way to think of state

A light switch on the wall has a physical position. Even after the hand leaves it, the switch remains where it was placed. That position is a kind of stored state.

Electronic memory does not have to use a moving handle, but it still needs some mechanism that lets the past affect the future.

A truth table needs one more idea

For ordinary combinational logic, A and B may be enough to determine Y.

For a memory circuit, the next output may also depend on the previous output:

Q(next) = function(inputs, Q(previous))

The letter Q is commonly used for a stored output or state.

Key distinction:
Combinational logic asks: “What are the inputs now?”
Sequential or state logic also asks: “What happened before?”

Try these yourself

A combinational circuit's output depends on: COMBINATIONAL current inputs → logic → output Output depends only on what the inputs are now. WITH MEMORY / STATE current inputs + previous state → next output Past events can affect what happens next. A circuit with state can remember.
Combinational logic has no memory; its output is determined by the present input combination.
What does the word state mean in this section?
State is remembered information that can affect what the circuit does next.
Why does feedback matter in memory circuits?
Feeding information from the output back into the logic is one common way to preserve a state.