stored bit
A Switch That Remembers
A plain switch only knows "right now". Loop two together and the circuit can hold a value on its own. That holding is memory.
Hold a bit
Press Set to store a 1. Press Reset to store a 0. Then let go and watch: the value stays.
The cell is empty, holding 0.
You let go, and it kept the value. A light switch on your wall does the same trick:
it stays where you left it. This circuit holds its
with no one pressing anything. Remembering one thing is the start of memory.
Two gates, holding hands
A single switch only knows "right now". The secret is to loop two gates so each one feeds the other.
Gate Atells Gate B
Gate Btells Gate A
Each gate's output is the other gate's input. So they keep agreeing with each other,
over and over, and that agreement is what gets held. Press Set and the loop locks onto 1.
Press Reset and it locks onto 0. This little holder has a name: a latch.
Each gate is built from a handful of ,
the tiny no-moving-parts switches you met earlier. Loop them up and they can remember. This is exactly
how the fast memory in a computer (called RAM) is built.
🔬 The real circuit (the cool part)
The classic version is called an SR latch: two NOR gates (or two NAND gates) cross-wired
so each one's output goes into the other's input. "S" sets it to 1, "R" resets it to 0, and when you
leave both alone, the loop holds whatever it had. Same idea as the buttons you just pressed.
Memory is many cells
One cell holds one bit. Line up four and you can hold four. Set and reset each one, then read the row.
Reading the row, left to right
0000
Each cell holds its own bit, all at once. A real computer does not stop at four. It stacks
millions, even billions of these cells. Together they hold every tab, photo, and game open on your screen
right now. Memory is just a huge wall of one-bit holders, each one a tiny latch like the one you built.
← The Foundry · every fact here is real science, kept simple. Tap the underlined words to dig deeper.