|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Endianness |
|
|
|
big-endian |
|
|
Storing data in memory |
|
|
Address |
Contents |
|
32-bit word: 4 bytes. |
|
|
1000 |
01 |
|
|
Each byte has an
individual address. |
|
|
1001 |
23 |
|
|
|
Smallest addressable unit |
|
|
1002 |
45 |
|
|
How many hexadecimal
digits in each byte? |
|
1003 |
67 |
|
|
|
Hex digit = 4 bits, so a
byte can hold 2 digits. |
|
1004 |
|
|
|
How do we store the value
01234567hex? |
|
|
1005 |
|
|
|
One way: store the digits
in order, |
|
|
1006 |
|
|
|
|
starting with the lowest
address. |
|
|
1007 |
|
|
|
This is called
big-endian, because the biggest-value |
|
|
|
byte is stored first. |
|
|
|
However, this means that
the MOST-significant byte |
|
|
|
has the LOWEST address. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|