LearnTronics
State and Memory — When Logic Remembers
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.
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:
The letter Q is commonly used for a stored output or state.
Combinational logic asks: “What are the inputs now?”
Sequential or state logic also asks: “What happened before?”