1
$\begingroup$

Say I have total 4 bytes on 1 byte addressable memory, with a 32 bit bus.

If I move value at 0'th address to one of the registers will system grab all 32 bits (all 4 bytes) through bus from memory, reprocess it to extract 0'th address value behind the scenes?

Or will it get exactly one byte through bus?

$\endgroup$
  • $\begingroup$ Don't confuse bits and bytes. $\endgroup$ – gnasher729 Dec 9 '16 at 11:05
1
$\begingroup$

It really depends on the hardware, the memory type, ...

Usually, for memory accesses, reading extra data have no side effect so a CPU may read 32bits and use a multiplexer to extract the byte from the correct data lane.

There are still some signals that indicates the width of accesses and which byte is actually read, because some addresses may be mapped to I/O ports, and reading an I/O port can have side effects.

It can also be used to optimize access times : Imagine a 32bits CPU connected to a bridge component as an interface to a 8bits NOR FLASH (for example some boot BIOS). The bridge should check which bytes are needed to minimize the number of accesses to the FLASH chip.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.