r/computerscience • • Dec 30 '23

WTF does ram actually do?

I know that RAM stores data for quick use for the CPU. But I want to know more, what does RAM actually do when its storing data. Like when I'm playing a game is RAM responsible for keeping track of how many bullets I shoot. If there are any game developers reading this please let me know. What kind of information does RAM store and how and when does it use it. The main thing I use my pc for is gaming and recording/video editing so how would RAM play a role in those things?

260 Upvotes

97 comments sorted by

View all comments

2

u/AdjustedMold97 Dec 31 '23

Think of your persistent storage (SSD or HDD) as a math textbook, and yourself as the CPU. You want to solve some of the problems that are in the textbook, but you can’t just do it all in your head. So, you’ll take some scratch paper and do your arithmetic there. RAM is pretty much the scratch paper of a computer, it’s a place where data is stored until it is no longer needed there. If you’re really happy with your work, you might want to write the answer in the margins of your textbook, that would be like saving a file you’ve edited. Hope this helps and isn’t terribly confusing!

1

u/Spiritual-Entry-1921 May 14 '25

I like this explanation