4 Understanding Programming
4-24
CP2E CPU Unit Software User’s Manual(W614)
Signed Binary
Unsigned BCD
Data type Decimal values Hexadecimal values
Notation Signed + or - With # symbol
Application
example
MOV -10 D0
Stores 10 decimal (#FFF6 hex) in D0.
MOV # FFF6 D0
Stores #FFF6 hex (10 decimal) in D0.
Precautions for
correct use
The input will be treated as an address in
the CIO Area and the contents of that
address will be specified if a decimal
value without + or - is input from the CX-
Programmer.
• An error will occur and the left bus bar will be
displayed in red if a hexadecimal value
including A to F is input without # from the
CX-Programmer.
• The input will be treated as an address in the
CIO Area and the contents of that address
will be specified if a decimal value without #
is input from the CX-Programmer.
Range 16 bits Negative: -32768 to -1 Negative: #8000 to #FFFF
Positive: 0 to +32767 Positive: #0000 to #7FFF
32 bits Negative: -2147483648 to -1 Negative: #80000000 to #FFFFFFFF
Positive: 0 to +2147483647 Positive: #00000000 to #7FFFFFFF
Data type Decimal values BCD values
Notation None
Application
example
+B #0010 D0 D1
Adds #0010 and the contents of D0 as BCD data
and stores the result in D1.
Precautions for
correct use
The input will be treated as an address in the CIO
Area and the contents of that address will be
specified if a decimal value without # is input from
the CX-Programmer.
Range 16 bits None #0000 to #9999
32 bits #0000 0000 to #99999999
-
10
+ or - sign
Decimal value
(integer)
# FFF6
Hexadecimal symbol
Hexadecimal value
using 0 to F
# 0010
BCD symbol
Decimal value using
0 to 9