How does flash memory work?

What if your memory only worked when you were awake? Every morning you would wake up as a completely new person who would need to re-learn how to walk and speak! Computers have a similar problem. Ordinary memory chips forget all information when the power turns off. This problem is solved by data storage devices – for example, magnetic hard disks. The latter, however, have long been outdated. Now flash memory is widely used, which is installed in ordinary PCs in the form of SSDs, smartphones, and many other devices.

How does this flash memory, which is found in almost all devices that we use, work? We will tell you in this article!

How computers store information

Any device with a processor inside processes information in digital form, Computers convert words and numbers into an endless string of zeros and ones – a binary code. For example, the letter A is written as “01000001,” and the question mark as “00111111.” 

It applies to any letters, numbers, and symbols. How do different devices understand all these codes? So simple – thanks to the long-established international standard ASCII.

How is information stored in memory chips? To do this, imagine a slightly different example. One person stands not far from another and uses eight flags, with the help of which he transfers some information to the second. Both people know the ASCII code, a raised flag means one, and a lowered one means zero.

This is how files are stored in the memory of computers, only flags in flash chips (or on magnetic disks) – many billions. These are microscopic switches called transistors, and each of them can be either ON or OFF.

Thus, with the help of eight transistors, the device can memorize a number or a letter. Each zero or each one is a bit, and each set of eight transistors is a byte. A typical 500GB SSD can store roughly 500 billion characters.

What is flash memory?

Conventional transistors are simple electronic switches that are influenced by electrical currents. It is both an advantage and a disadvantage. The advantage is that it is relatively easy to change the data in such transistors. The con is that, at the moment, the current is turned off, ordinary transistors take their original state, and all the information stored in them is lost.

Computer memory that works in this way is called Random Access Memory (RAM). Another type of memory is Read-Only Memory (ROM), which does not suffer from this problem.

Flash memory is designed, in such a way, that its chips can store any necessary information even when the power is off – for an almost infinitely long time.

How flash memory works

How is the effect of saving data achieved even when the power is off? For this, another type of transistor is used, which is called a floating gate transistor.

The simplest transistor has three connections through which it can control – gate, source, and drain. Imagine a water pipe through which not water flows but current. The place through which the current enters this pipe is called the source. And the one through which it leaves is called the drain. The gate is located between them – when it is open, the current flows freely through the transistor (this is one), and when it is closed, it does not (this is zero). If you turn off the power, such a transistor will also turn off, and when turned on, it will be in its original state.

The floating gate transistor has a second, additional gate. When it opens, a weak charge of electricity penetrates in between the two gates. This is how one gets. Even if the device is disconnected from the mains, this charge will remain in place. You can turn this unit to zero if you activate the second shutter. 

Technical details

Want a more technically advanced description of the process? It would take too much space. But we will try to explain everything in a nutshell. To begin with, we recommend that you read the article on the so-called MOS structures in Wikipedia.

Flash transistors are almost the same as MOS structures, but they have two transistors instead of one. It is an npn-type “sandwich,” one gate is called a control gate, and the other is a floating gate. They are separated by oxide layers through which electricity cannot pass.

How to write a unit into such a transistor? There are many electrons in both its drain and its source because they are made of n-type silicon. But these electrons cannot move because of the p-type silicon that is between them. To activate the process, you need to turn on a positive voltage on two contacts of the transistor. As a result of which the electrons begin to move – from source to drain. Some of them will remain on the floating shutter due to the tunnel effect.

This is how flash memory stores information – thanks to electrons in floating transistor gates. These electrons can remain there for a very long time without power. You can remove them if you turn on a negative voltage on one of the contacts.

How long does flash memory last

Over time, any transistor in a flash memory chip can fail – the more such floating gates are used, the slower they work and eventually stop working altogether. In practice, this has long ceased to be a problem in mobile devices like phones and SSDs.

First, we are talking about hundreds of thousands of write and erase cycles of data. For example, for a USB flash drive or memory card that you use in your digital camera, this is too large a number.

Secondly, flash memory has long become “smart.” The process of writing and reading data is controlled by specialized controller chips that take into account the degree of wear of different sectors of transistors and maximize their service life. Modern devices with flash memory can survive hundreds of millions of rewriting cycles and even more.

In the case of SSD drives, when buying, you should pay attention to the TBW indicator. It is usually indicated in the list of technical characteristics of the model. It tells you how many terabytes of data can be written to the SSD memory before the moment when its flash memory starts to fail and depends on both the quality of the memory itself and its controller. So, for a 1-terabyte NVMe SSD Samsung 970 Pro, this figure is 1200. You can completely overwrite all its bits 1200 times. 1200 terabytes! On a typical home PC, this process will take many years. Modern server SSDs are even more robust. 

What do you think?

Written by HackerVibes

Toyota’s new BZ4X electric vehicle will have a yoke and solar panels on the roof

iPhone 14 rumors, release date, specs, news, price and all of the leaks