CPU16
REFERENCE MANUAL
DATA TYPES AND ADDRESSING MODES
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
4-1
SECTION 4 DATA TYPES AND ADDRESSING MODES
This section contains information about CPU16 data types and addressing modes. It
is intended to familiarize users with basic processor capabilities.
4.1 Data Types
The CPU16 uses the following types of data:
Bits
4-bit signed integers
8-bit (byte) signed and unsigned integers
8-bit, 2-digit binary coded decimal numbers
16-bit (word) signed and unsigned integers
32-bit (long word) signed and unsigned integers
16-bit signed fractions
32-bit signed fractions
36-bit signed fixed-point numbers
20-bit effective addresses
There are 8 bits in a byte, 16 bits in a word. Bit set and clear instructions use both
byte and word operands. Bit test instructions use byte operands.
Negative integers are represented in two’s-complement form. Four-bit signed integers,
packed two to a byte, are used only as X and Y offsets in MAC and RMAC operations.
Integers of 32 bits are used only by extended multiply and divide instructions, and by
the associated LDED and STED instructions.
Binary coded decimal numbers are packed, two digits per byte. BCD operations use
byte operands.
16-bit fractions are used in both fractional multiplication and division, and as multipli-
cand and multiplier operands in the MAC unit. Bit 15 is the sign bit. An implied radix
point lies between bits 15 and 14. There are 15 bits of magnitude — the range of val-
ues is –1 ($8000) to 1 – 2
-15
($7FFF).
Signed 32-bit fractions are used only by fractional multiplication and division instruc-
tions. Bit 31 is the sign bit. An implied radix point lies between bits 31 and 30. There
are 31 bits of magnitude — the range of values is –1 ($80000000) to 1 – 2
-31
($7FFFFFFF).
Signed 36-bit fixed-point numbers are used only by the MAC unit. Bit 35 is the sign bit.
Bits [34:31] are sign extension bits. There is an implied radix point between bits 31 and
30. There are 31 bits of magnitude, but use of the extension bits allows representation
of numbers in the range –16 ($800000000) to 15.999999999 ($7FFFFFFFF).
20-bit effective addresses are formed by combining a 16-bit byte address with a 4-bit
address extension. See
4.3 Addressing Modes
for more information.
F
Freescale Semiconductor, Inc.
n
.