seegongsik
Saved words
Structure

How does a computer remember?

So far we've calculated with gates. But a gate, once its input is gone, loses its output right away. So how do we remember a value? There's one very clever move.

01

Let go and it vanishes at once

A gate has one weakness.
Its output only shows
while the input is coming in.
Press the button and the light turns on,
but the moment you let go
it goes right out.
Try it yourself.
See what happens when you release.

Press and it turns on, let go and it goes off

Press the button, then let go.

This way you can calculate
but can't remember.
You can make a number for a moment,
but it flies away the instant you let go.
We need another way
to hold a value.

02

It feeds its own output back to itself

The clever move is this.
Take the gate's output,
and feed it back
into its own input.
Then something curious happens.
Once it's on,
that on signal
keeps turning itself on.
Even when the input is gone,
it holds on its own.

Gate
Output goes back to input
Once a state is set, it holds onto itself and stays

The output goes back to the input.

This feedback loop
is the heart of memory.
Like two people
standing while holding each other up,
the circuit props up
its own state by itself.

03

Put a value in and it stays

With this feedback circuit
we make a slot that remembers one value.
Press the "remember" button and it becomes 1,
press the "erase" button and it becomes 0.
The key is,
even when you let go of the button,
that value stays.
Try it yourself.

0Value remembered now
Put in any value

Put a value in, then let go.

The value stays even after you let go, right?
This is memory.
This little slot
is called a flip-flop.
It means a flick sends it to one side
and it stays there.

04

Write it down, read it back later

The use of memory
shows after time passes.
Write a value now (writing),
check it again much later (reading),
and it's still there.
This "write and read"
is the basic action of all storage.
Press play and follow along.

1. Write
Put a value in
1
2. Time passes
Even doing nothing
1
3. Read
It's still there
1

Write, wait, read.

A value you wrote
reads back the same even after time.
Thanks to this simple promise,
a computer can briefly hold
the calculation it just did,
and the letters you typed.

05

Gather lots of these slots and it's memory

One flip-flop
remembers 1 bit, just a 0 or a 1.
So what if you gather many?
Gather eight for one character (one byte),
gather billions
and it becomes a photo, a song.
Turn on the slots below.

Billions of these little cells are the computer's memory

One slot is one bit.

The circuit that calculates (the adder)
and the circuit that remembers (the flip-flop),
these two are the pillars of a computer.
Next time we'll see
how this gathered memory
gets a name tag (an address)
so we can find the exact slot we want.

In one lineWith one move, feeding output back to input, a circuit with electricity flowing came to hold a value. Gather lots of these little memory slots, and that's the computer's memory.
Was this helpful? Support seegongsik
Structure