Home > other >  Computer composition principle - memory addressing and addressing
Computer composition principle - memory addressing and addressing

Time:09-30

If a memory addressing in bytes, so the CPU can in bytes, half word and word to access the memory,

Based on the above assumptions are the following questions:
1. The boundary can not aligned address access to a particular word by word?
2. The CPU give that address later, memory is how to determine the's visit to access a byte or half a word or word?
3. If the word is addressing, then is an access cycle take out a word, or by more than one byte address out respectively and then make a word?
4. Different addressing modes, MDR digits will be different? Just decided by way of addressing MDR digits?

This a few problem bothering me for a long time, hope to have a friend can tell, thank you!

CodePudding user response:

Should be according to the boundary of the words read a word, and then according to the instruction is a byte read or read words give irrelevant bytes

CodePudding user response:

1: this without considering or worry,
2: read the specified address data, how long each time to read, is defined according to the address of data types, such as read 1 byte, char c int at 4 bytes
3: how much data, the read-only 1 byte at a time,
Such as int a=* (char *) 40000001; So that every time read only 1 byte put inside a, read how much is defined according to the address of data types,
And as the int a=* (int *) 40000001; Even 4 bytes read put inside a, because a is 4 bytes
4: don't know

CodePudding user response:

People than people than the dead! Now the former also can arrange questions so clearly! Want to learn for many years, I was not even ask these questions, has been confused paste paint! Many companies, 30 years old, forty years of age, the programmer is when the old man stop is reasonable,

CodePudding user response:

refer to the second floor zhouml_msn response:
1: this without considering or worry,
2: read the specified address data, how long each time to read, is defined according to the address of data types, such as read 1 byte, char c int at 4 bytes
3: how much data, the read-only 1 byte at a time,
Such as int a=* (char *) 40000001; So that every time read only 1 byte put inside a, read how much is defined according to the address of data types,
And as the int a=* (int *) 40000001; Even 4 bytes read put inside a, because a is 4 bytes
4: don't know
thank you for your reply, but I want to know from the Angle of the computer composition principle or the CPU to memory in a addressing and addressing mode point of view to understand this a few questions (after all, to cope with the examination )

CodePudding user response:

reference 1/f, worldy response:
should be according to the boundary of the words read a word, and then according to the instruction is a byte read or read words give irrelevant bytes
thank you for your reply
  • Related