HDD vs SSD: From Clicking Save to the Physics of Storing a Single Bit
Ever wondered what actually happens inside your computer when you click Save? Discover how HDDs use magnetism, how SSDs use electrical charge, and how both technologies preserve your data. You write a few lines in a text editor, click Save , and close the application. The next day, you open the file, and your text is still there. But how did your computer preserve that information after the power…
When you click "Save" in a text editor application, several components in your computer's operating system and hardware work together to store your file. The text editor sends a request to the operating system, which coordinates access to the storage device through its file system. The storage driver and interface then sends the request to the storage controller, which manages the physical storage operation.
An HDD inside your computer is made up of several components that work together to record and retrieve data from rotating magnetic surfaces. These include platters, magnetic coating, spindle motor, read/write head, actuator arm, voice-coil actuator, controller board, and cache if present. The platters are circular disks that hold the data, while the magnetic coating allows for the storage of magnetic patterns.
The spindle motor rotates the platters at high speeds, and the read/write head records and detects magnetic patterns on the platters. The actuator arm moves the heads to the required track, and the controller board manages commands, positioning, data processing, and communication.
To understand how data is stored magnetically, we must first recognize that certain materials can retain a magnetic state even after the external magnetic field that changed them is removed. In an HDD, this principle is used to encode bits of information as magnetic patterns on the platters. The drive records controlled magnetic patterns in these regions, which can be detected and decoded later.
Each bit is represented by a magnetic state, and the drive does not need continuous power to maintain the recorded magnetic pattern, making HDD storage non-volatile.
When data is saved to an HDD, the controller receives the target logical address and data, moves the read/write head to the appropriate position on the platter, and creates a magnetic field using an electric current. This magnetic field changes the magnetic state of a tiny region on the platter, storing the bit of data. Once the region has been written, its magnetic state remains stable even after the writing field is removed, allowing the data to persist without continuous power.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.