Memory or RAM is located external within the Central Processing Unit(CPU).Data has to be loaded into a CPU register from memory before the CPU can process it. RAM is much slower than registers.
Registers are memories located within the Central Processing Unit(CPU).They are few in number (there are rarely more than 64 registers) and also small in size,typically a register is less than 64 bits in size.
- To definite a memory address to copy form , we need to specify two things:
- A Numerical offset in bytes.
- An able memory address is the sum of these two values.
- For Example:-
4($t0) ;
where $t0 = 1000
->The memory address pointed to by the value in $t0 , then need to add
8 BYTES.Therefore,the effective address is 1004. (1000+4)
- lw is Load Word , meaning that values are loaded from memory address into registers and stored from registers to memory address.Where 32 bits or one word are loaded at a time.
lw $t1 , 4 ( $t2 )
-> Load $t1 with the word at memory address 4 + address value stored in register $t2.
B031210379
i can understand well.^^
ReplyDelete