How Byte loading/storing is implemented By the CPU?
Posted
by
AlexDan
on Programmers
See other posts from Programmers
or by AlexDan
Published on 2014-04-28T16:47:54Z
Indexed on
2014/06/08
9:40 UTC
Read the original article
Hit count: 272
I know that in 32bit machine, cpu read from memory 32bits at a time. since the registers in this case is 32bit in size too, I can understand how this works.
What I don't understand is how the cpu implement load instructions of 1 byte. does it load the whole word where the single byte is located to the register, then perform some kind of "byte shifting", or does the cpu can load a single byte, in this case when does the byte masking happen, is it until the byte got loaded in the register, or it happen when byte is send through the data bus ?
P.S. The cpu Im using is MIPS, the instructions Im talking about are: lb or lbu
© Programmers or respective owner