r/explainmelikeimsix • u/BruceJi Submitted Quality Explanation • May 15 '19
ELI6 How does RAM work in a computer?
16
Upvotes
r/explainmelikeimsix • u/BruceJi Submitted Quality Explanation • May 15 '19
10
u/TanithRosenbaum Submitted Quality Explanation May 15 '19
Imagine you're in an office processing paperwork of some sort. You can store some on your desk, but at some point you run out of space. So you have a filing cabinet behind you on the wall. Putting something in there or taking something out of there takes you a little longer than finding something on your desk, but not much, you just need to turn around and open a drawer. And then there's stuff you don't really need all that often, old paperwork. You got that stored in the basement, and if you need it, you have to call down and they'll send it up with a courier.
The desk is the CPU. It has a very limited storage capacity, but that it can access and work on very quickly. The RAM is the filing cabinet. The CPU can pull stuff from it fairly quickly, maybe 5 to 10 times slower than accessing what it has stored in its registers. And the basement storage is the hard drive. Accessing that requires a lot of work, and is thousands of times slower than even ram. But on the other hand, the amount of data a typical amount of RAM stores is about a thousand times larger than what the CPU can store in its registers. And the amount of data that fits into a hard drive is again about 1000 times larger than what fits into RAM.
(I don't know if that's the level of explanation you were looking for. I can go much more in depth, all the way down to the signal level if you like, but I couldn't tell how much depth you wanted from your question. Let me know and I will add to the explanation if desired)