Second pass-depth understanding of representation and processing of information Part1 Chapter II computer system

 

The second time reading this book, spend two to three hours a week of time, you can read how much reading (see the chapter on page 28)

The first pass the corresponding notes link  https://www.cnblogs.com/stone94/p/9824395.html

 

When an integer is stored in the computer, it is generally stored in the form of complement

Because's complement calculation, the computer determines the sign bit can not (directly as all bits have value), the addition may be used to replace subtraction (less an algorithm)

 

For virtual address and virtual address space do not understand, put down the content excerpt:

"Machine-level program memory as a very large array of bytes, called a virtual address (virtual memory). Each byte of memory by a unique number to identify, called its address (address), all possible set of addresses called virtual address space (virtual address space). As the name suggests, this is just a virtual address space for machine-level program conceptual image show. "

 

"Every computer has a word length (word size), nominal size specified pointer to the data (normal size). Because the virtual address is such a word coded, so word of the decision is the most important system parameters the maximum size of the virtual address space. That is, for a w-bit word length of the machine, the virtual address range is 0 ~ 2 ^ w-1, to access up to 2 ^ w bytes "

Here you can read, but can not come out with their own words

 

Because of the C language is not too familiar, especially the record pointer in the C language statement:

For any data type T, statement

T *p;

It indicates that p is a pointer variable, point to an object of type T. E.g,

char *p

It will be declared as a pointer to point to an object of type char.

 

"Programmer FIG stress make them portable applications on different machines and compilers. Portability aspect is to make a program insensitive to the exact size of the different data types of standard language for digital .C range of different data types is provided the next, but not last, because from about 1980 to about 2010, 32-bit and 32-bit machine program is a combination of the mainstream. with the increasing popularity of 64-bit machines, in these programs ported to new machines , the many hidden dependence on the word length will emerge and become an error. for example, many programmers assume a declared type int be used to store a program object pointer. most of this 32-bit machine It works fine, but on a 64-bit machine but it will cause problems. "

I understand:

int both in 32-bit or 64-bit machine, it is 4 bytes, or 32 bits,
and the virtual address range determined by a word length, i.e., on a 64-bit machine, the virtual address range of 0 to 2 ^ 64-1, the pointer value stored in the virtual address, so the 64-bit machine, can not be used to store pointers int.

 

 

doubt:

Hexadecimal notation is used in a particular place? It is used only in the machine-level program do?

What programs are machine-level program? Machine-level assembler program refers to it?

32-bit word length limit to 4GB virtual address space, can be understood as on 32-bit machines, a program can be loaded into the data up to 4GB of memory?

 

Guess you like

Origin www.cnblogs.com/stone94/p/11449336.html