- In case of a 32 bit word length, natural word boundary occur at addresses 0,4,8 as shown in the previous diagram.
- In general, words are said to be aligned in memory if they begin at a byte address that is a multiple of the number of bytes in a word
- The number of bytes in a word is a power of 2. So if the word length is 16 bits then we will have 2 bytes and aligned word begins at byte addresses 0, 2, 4…
- When the words begin at some arbitrary addresses then it is called as unaligned addresses. That is if a word is of two bytes ( 16 bits), instead of storing the words at 0, 2, 4… it may begin with 1 then 3 then 5 and so on
Accessing Numbers, Characters and Character Strings
- A number usually occupies one word.
- Individual characters can be accessed by their byte address.
- The beginning of the character string is indicated by giving the address of the byte containing its first character.
Big Endian and Little Endian assignments << Previous
Next >> Memory Operations
Support us generously: contact@lessons2all.com
Our aim is to provide information to the knowledge
seekers.