Lecture 03 Flashcards
What does it mean if memory is Word Addressed?
There is an individual address for each word.
Extra information is used to refer to a specific byte within a word.
What does it mean if memory is Byte Addressed?
There is one address for each 8 bit byte (octet).
Here, the lowest address in the word stands for the word.
What is the difference between ‘big-endian’ and ‘little-endian’ in reference to memory addressing?
In big-endian addressing, the bytes of the data are stored chronologically in memory with the first byte in the first address, and the last byte at the last.
In little-endian addressing, the data is stored with the first byte in the first byte in the last address and the last byte in the firs t address etc.
What is ‘immediate mode’ for memory addressing?
The value is specified in the instruction itself.
This is used for constants.
What is ‘direct mode’ for memory addressing?
The value is at a fixed address which is specified in the instruction. This is used for ‘global variables’
What is ‘index mode’ for memory addressing?
The value is at a fixed address plus an index obtained from a register. This allows a = b[i] to be implemented in one instruction.
What is ‘indirect mode’ for memory addressing?
The value is at a fixed address which is in a register.
It has extra power relative to immediate and direct modes.
What does CISC stand for?
Complex Instruction Set Computer
What does RISC stand for?
Reduced Instruction Set Computer
Suppose we have a hexadecimal number 0xDEADBEEF.
It is stored DEADBEEF in memory. Is this little-endian or big-endian?
Big-Endian
Suppose we have a hexadecimal number 0xDEADBEEF.
It is stored EFBRADDE in memory. Is this little-endian or big-endian?
Little-Endian
Is x86 a CISC or a RISC ISA?
CISC. There are many different lengths of instructions.
How many general purpose 64-bit registers does a 64-bit x86 chip have?
16
How many general purpose 32-bit registers does a 32-bit x86 chip have?
8
On 64-bit x86, which register is the lower 32 bits of the register ‘rax’?
eax
For all of the registers ‘rax - rsp’, the lower halves are accessed by replacing the ‘r’ with an ‘e’.