Omron SYSMAC CS Series Instruction & Reference Manual page 55

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

Values Represented in 1-word Data
Value
(Decimal)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
:
9999
10000
:
32767
32768
:
65535
−1
:
−32768
−32769
CS/CJ/NSJ Series Instructions Reference Manual (W474)
The two's complement b Hex of a Hex is FFFF Hex − a Hex + 0001 Hex =
b Hex. To determine the two's complement b Hex of "a Hex," use b Hex =
10000 Hex − a Hex.
Example: to determine the two's complement of 3039 Hex, use 10000 Hex
− 3039 Hex = CFC7 Hex.
Similarly use a Hex = 10000 Hex
from the two's complement b Hex.
Example: To determine the real value from the two's complement CFC7
Hex use 10000 Hex − CFC7 Hex = 3039 Hex.
The CS/CJ Series has two instructions: NEG(160)(2'S COMPLEMENT)
and NEGL(161) (DOUBLE 2'S COMPLEMENT) that can be used to deter-
mine the two's complement from the true number or to determine the true
number from the two's complement.
Binary representation
Decimal representations
Unsigned
Signed
&1
&2
&3
&4
&5
&6
&7
&8
&9
&10
&11
&12
&13
&14
&15
&16
:
&9999
&10000
+10000
:
&32767
+32767
&32768
Not applicable.
:
&65535
Not applicable.
−32768
Not applicable.
1. Basic Understanding of Instructions
b Hex to determine the value a Hex
Hexadecimal
representation
+1
#0001
+2
#0002
+3
#0003
+4
#0004
+5
#0005
+6
#0006
+7
#0007
+8
#0008
+9
#0009
+10
#000A
+11
#000B
+12
#000C
+13
#000D
+14
#000E
+15
#000F
+16
#0010
:
:
+9999
#270F
#2710
:
:
#7FFF
#8000
:
#FFFF
−1
#FFFF
:
:
#8000
Not applicable.
BCD representation
(decimal)
#0001
#0002
#0003
#0004
#0005
#0006
#0007
#0008
#0009
#0010
#0011
#0012
#0013
#0014
#0015
#0016
:
#9999
Not applicable.
Not applicable.
21
1

Advertisement

Table of Contents
loading

Table of Contents