0

Every architecture fetch from memory according to it's architecture bit at a time.

16 bit 2bytes at a time,32 bit arch 4 byte,64bit arch 8 byte from memory at every fetch and store

Than this machine code of x86_64:

0: b8 05 00 00 00. Mov eax,0x5.
5: cd 80.          int 0x80

This will consume 5 bytes of memory but and at once 64bit will fetch 8byte than how instruction execution will work as in one fetch it can load both instruction.

OSdev
  • 97
  • 6
  • *Every architecture fetch from memory according to it's architecture bit at a time.* - nope. As an example, 32-bit Pentium had a 64-bit wide bus, and the data path from cache to MMX / x87 load/store units was also 64 bits wide. Anyway, instruction-fetch from L1i cache is actually done in 16-byte chunks, to get more instruction in parallel. See [How is a 15 bytes instruction transferred form memory to CPU?](https://stackoverflow.com/q/54917136) – Peter Cordes Mar 21 '22 at 18:11

0 Answers0