How does computer memory work?

979 views

When you physically save a file, like a photo or a word document, how is it physically saved? Where is that document physically? I believe there are two modern memory devices, HDD and SDD, but how do they work? How can a Hard Disk Drive be ‘scratched’ the right way to save my essays? And when I save a file to a flash drive, where on the flash drive are my documents? How can another computer read that flash drive? Is it a series of electrons or switches moved to remember each part of the document, like the 38th word on the 4th page?

In: Technology

4 Answers

Anonymous 0 Comments

A disk drive is kind of like a book. A book has a bunch of pages. At the front of the book is a bunch of pages containing special information: a table of contents. If you want to find where a particular poem starts (let’s say it’s a book of poems), you look in the table of contents, and it will tell you the page to turn to. The table of contents is always stored at the start of the book.

Hard drives and SSDs work the same way. Instead of pages, they will have a bunch of blocks of data. Like a book, a hard drive or SSD will have a special set of blocks which contain the directory, which is just like a table of contents.

Part of the directory is a list of where all the blank blocks are. When you save your photo or document, the computer figures out how many blocks it’s going to take up. It then looks up in the directory where there is an empty set of blocks. It removes those blocks from the empty list, and writes your file to them. Then it adds an entry into the directory containing the name of your file, and what block number it starts on.

Different computers can figure out where your document is stored simply by looking up the file name in the directory.

You are viewing 1 out of 4 answers, click here to view all answers.