Appendix 1 Numeric System & Data Structure
XBC E-Type Main Unit
Appendix 1-6
Ver. 1
2) Expression of integer numbers
XGB instructions are based on negative operation system (Signed).
I
f the highest
bit (MSB) is 0, it is a positive number; if it is 1, it is a negative number.
T
he highest
bit expressing a negative or a positive number is called the Sign bit.
Since the position of MSB is different in 16 bits and 32 bits, pay attention to the position of Sign bit.
In case of 16 bits
In case of 32 bits
3) Expression of negative number
Ex.) How to mark – 0001
(1) Take out the negative sign and mark 0001. (b15=1)
b15 b0
1
0
~
0
1
(2) Reverse the result of (1). (b15 = excepted)
b15 b0
1
1
~
1
0
(3) Add +1 to the result of (2).
b15 b0
1
1
~
0
1
-0001 = hFFFF
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...