Memory Principle
Power on, start bios,cpu work, call memory, memory and hard drive request resources when you click on a file data is communicated to the CPU,CPU to send instructions to memory, memory there will communicate with the hard disk, ask him there is no this thing, he said there is, You'll see what's inside this folder.
(Xee: RAM is a random access memory, it is characterized by volatile, that is, loss of power.) --Mom eggs, no wonder a power outage, my things have not been saved, can not find--
Since memory is used to store data and programs that are currently in use (i.e., executing), how does it work? The memory of the computer we refer to refers to the dynamic memory (that is, DRAM), the so-called "dynamic" in dynamic memory, which means that when we write the data to DRAM, the data is lost after a period of time, so an additional circuit is required for the memory refresh operation. The specific work process is this: a DRAM storage unit is stored in 0 or 1 depending on whether the capacitor has an electric charge, an electric charge represents 1, and no charge represents 0. But for a long time, the capacitance that represents 1 will discharge, representing 0 of the capacitance will absorb the charge, this is the reason for data loss. The refresh operation periodically checks the capacitance, and if the charge is greater than 1/2 of the full charge, it is considered to represent 1, and the capacitor is fully charged, and if the charge is less than 1/2, it is considered to represent 0 and discharges the capacitor to maintain the continuity of the data. )
data is always stored in binary form in memory. The values are expressed in complement.
Integral type:
A positive complement is in the same form as its original code. And the complement of negative numbers is the binary form of its absolute value "bitwise negation plus 1"
Real type:
The memory occupies 4 bytes, is stored in the exponential form, the real data is divided into fractional parts and exponential parts, respectively storage! The computer uses a binary representation of the fractional part, with a power of 2 to represent the exponential part!
Character type:
The storage of characters in memory is actually the typeface of the ASCII code corresponding to the character in the storage unit. These ASCII code values are also stored in binary form on the computer. This is similar to the storage of an integer type. So the conversion between the two classes is also more convenient!
How to store character data in memory and how to use it
When the system represents a character data, it does not store the shape of the character itself in memory, but only the ASCII code of the character into memory. All the data in memory is stored in binary form. So in the above example, the ' x ' and ' Y ' are represented in memory as follows:
The ASCII code for ' x ', ' y ' is 120, 121. The binary form of 120 and 121 is 1111000, 1111001.
So the expression ' a ', ' B ' in memory is 1111000, 1111001.
Why computer memory, hard disk can store data, please describe briefly
;
Hardware technology is constantly evolving, so, can only say the basic principle: the surface of the disk has a lot of small particles, can be magnetized. Use degaussing and magnetization principles to identify data. 1 bytes, 8 bits binary, one word energy saving means 255 values (0000 0000 ~ 1111 1111) The program executes, first loading the file into memory. Each area of memory has a memory address, and one memory unit is one byte. When the program loads in memory, it occupies a portion of the area, which is identified by using the range of memory cells.
How memory is stored
Memory, the English name is RAM (random access memory), is the full name of the stochastic access storage. The main function is to store the code and data for the CPU to call when needed. But the data is not as simple as a cask of water, but rather as a library with a lattice bookshelf to store books, not only to be put in but also to be able to accurately call out when needed, although it is a book but each book is different. The same is true for memory, even though it is stored in code representing 0 and 1, but different combinations are different data. Let's go back to the books and shelves. If there is a bookshelf with 10 rows and 10 columns (each row and each column has a 0~9 number), and 100 books are stored in it, we can determine the location of a book by using a row number and a column number. If we know the number of this book is 36, then we first lock the 3rd line, and then find the 6th column will be able to find the exact book. The same principle is used in memory, and now let's go back to memory, for which the data bus is used to pass in or out of the data. Because the storage space in the memory is defined by certain rules as the bookshelf of the book that is mentioned earlier, we can use this rule to store the data in the corresponding location on the memory, and the work of this kind of positioning depends on the address bus. for the CPU, memory is like a long "line" with many spaces, and each space has a unique address corresponding to it. If the CPU wants to call the data from memory, it first needs to send the address data to the address bus to locate the data to be accessed, and then wait for several clock cycles before the data bus transmits it to the CPU. When the address decoder receives the address data sent by the address bus, it locates the data that the CPU wants to call, based on that data, and then the data bus transmits it to the CPU. the CPU accesses only 1 bytes of data at a time in a row of data. Back in practice, the CPU usually needs to call 64bit or 128bit of data each time (the single-channel memory controller is 64bit and the dual channel is 128bit). If the data bus is 64bit, the CPU will access 8 bytes in a single time, because each time the data is accessed 1 bytes, the 64bit bus will not show any advantage, the efficiency of the work will be reduced a lot. This is why both the motherboard and CPU now use a dual-channel memory controller.
Easy to understand: in-memory data