6.2.1.1 char and short Data Types (signed and unsigned)
The char and unsigned char data types are stored in memory as a single byte and are loaded to and stored from bits 0-7 of a register (see Figure 6-1). Objects defined as short or unsigned short are stored in memory as two bytes at a halfword (2 byte) aligned address and they are loaded to and stored from bits 0-15 of a register (see Figure 6-1).
Figure 6-1 Char and Short Data Storage Format
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
I |
I |
I |
I |
I |
I |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
U |
U |
U |
U |
U |
U |
U |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
S |
I |
I |
I |
I |
I |
I |
I |
I |
I |
I |
I |
I |
I |
I |
I |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
U |
U |
U |
U |
U |
U |
U |
U |
U |
U |
U |
U |
U |
U |
U |
U |
LEGEND: S = sign, I = signed integer, U = unsigned integer, MS = most significant, LS = least significant |