Current location - Training Enrollment Network - Books and materials - After power failure, the RAM in the computer memory will lose data.
After power failure, the RAM in the computer memory will lose data.
After power failure, the data stored in the computer memory RAM will be lost.

This is because RAM is a random access memory, which means that data can be read and written from it. But when the power of the machine is turned off, the data stored in it will be lost.

The storage of these data is not like putting rice in a bag, but more like storing books in a lattice shelf in a library. Not only put it in, but also call it out accurately when necessary. For RAM and other memories, the principle is similar. Although all codes representing 0 and 1 are stored, different combinations become different data.

If there is a bookshelf with 10 rows and 10 columns (each row and column has a number of 0-9), and 100 books are to be stored in it, then we can determine the position of a book according to the number of rows and columns. If the book number of a book is known as 87, then we can lock the eighth row first and then find the seventh column, so as to find the book accurately.

The storage principle of RAM memory is similar. In RAM memory, data bus is used to realize data input and output. The storage space in the memory is defined by rules similar to those of the bookshelf for storing books described above. According to this rule, we can store the data in the corresponding position in the memory, and the location of the data is realized through the address bus.

Extended data

RAM addressing principle:

For CPU, RAM is like a long thin line with many spaces on it, and each space has a unique address corresponding to it. If CPU wants to call data from RAM, it needs to send address data to the address bus first, locate the data to be accessed, and then wait for several clock cycles before the data bus transmits the data to CPU.

When the address decoder receives the address data sent by the address bus, it will locate the location of the data to be called by the CPU according to this data, and then the data bus will transmit the data to the CPU.

CPU only accesses one byte of data at a time in a row of data, but it is different in the real world. Usually, the CPU needs to call 32-bit or 64-bit data at a time (depending on the bit width of the data bus of different computer systems).

If the data bus is 64-bit, the CPU can access 8 bytes of data at a time, because it still accesses 1 byte of data at a time. The 64-bit bus will not show any advantages, and the work efficiency will be reduced a lot.