CPU
2.6 Data Formats
2
(2) Data formats in memory
The data sizes in memory can be byte (8 bits), halfword (16 bits) or word (32 bits). Although byte data can
be located at any address, halfword and word data must be located at the addresses aligned with a
halfword boundary (least significant address bit = "0") or a word boundary (two low-order address bits =
"00"), respectively. If an attempt is made to access memory data that overlaps the halfword or word bound-
ary, an address exception occurs.
Address
+0 address
+1 address
+2 address
+3 address
b0
7
8
15 16
23 24
b31
Byte
Byte
Byte
Byte
Byte
b0
b0
b31
b31
15
Halfword
Halfword
Word
Halfword
Word
Figure 2.6.3 Data Formats in Memory
(3) Endian
The diagrams below show a general endian system and the endian adopted for the M32R family of
Mitsubishi microcomputers.
Bit endian
(H'01)
Byte endian
(H'01234567)
Big endian
H'23
HL
H'45
LH
H'67
LL
B'0000001
H'01
HH
b0
b7
Little endian
B'0000001
b7 b0
H'45
LH
H'23
HL
H'01
HH
H'67
LL
Note: • Even when bits are arranged in big endian, H'01 is not B'10000000.
Figure 2.6.4 General Endian System
32180 Group User’s Manual (Rev.1.0)
2-10