CHAPTER 3 DATA TYPES
3.2 Data Representation
3.2.1 Integer
An integer is expressed as a binary number of 2’s complement and is 32, 16, or 8 bits long. Regardless of its
length, bit 0 of an integer is the least significant bit. The higher the bit number, the more significant the bit. Because
2’s complement is used, the most significant bit is used as a sign bit.
The integer range of each data length is as follows.
• Word (32 bits):
• Halfword (16 bits):
• Byte (8 bits):
–2,147,483,648 to +2,147,483,647
–32,768 to +32,767
–128 to +127
3.2.2 Unsigned integer
While an integer is data that can take either a positive or a negative value, an unsigned integer is an integer that is
not negative. Like an integer, an unsigned integer is also expressed as 2’s complement and is 32, 16, or 8 bits long.
Regardless of its length, bit 0 of an unsigned integer is the least significant bit, and the higher the bit number, the more
significant the bit. However, no sign bit is used.
The unsigned integer range of each data length is as follows.
• Word (32 bits):
• Halfword (16 bits):
• Byte (8 bits):
0 to 4,294,967,295
0 to 65,535
0 to 255
3.2.3 Bit
1-bit data that can take a value of 0 (cleared) or 1 (set) can be handled as bit data. Bit manipulation can be
performed only on 1-byte data in the memory space in the following four ways.
• SET1
• CLR1
• NOT1
• TST1
User’s Manual U14559EJ3V1UM
35