DEV Community

loading...

Discussion on: Explain "memory" like I'm five

Collapse
zoejm profile image
zoe-j-m

It's like a row of coat pegs at school. Each coatpeg has a number, so you can be told to go to it easily.

You can hang only one thing on each coat peg, and it's really quick to go and get them, but there's only so many pegs, so you can run out.

A peg might be empty, or it might have a coat on it. If you want to put a coat on a peg, you can only do so if there's not a coat there already, or you take the old coat off first.

Computer memory is like that - lots and lots of numbered hooks, each possibly holding a single piece of information.

The hard disk is more like a big chest. It can store loads and loads of coats, but it's quite slow to get them, and you might have to lift out a number of coats to get to yours.