3
SEQUENCE PROGRAM EXECUTION
3.7 Numeric Values which can be Used in Sequence Programs
3.7.1 BIN (Binary Code)
3
- 16
1
O
verv
iew
2
Per
fo
rma
nce
S
p
ecifica
tio
n
3
S
equ
en
ce P
ro
g
ra
m
Co
nfig
ura
tio
n a
nd
E
xecut
io
n Co
nd
iti
o
ns
4
I/O N
unb
er
Assig
n
m
e
nt
5
Me
mor
ie
s a
nd
File
s
Ha
nd
led
by CP
U Mo
du
le
6
Func
tions
7
Co
mmu
nica
tion
with
Inte
llig
en
t Fu
n
ct
ion
Mo
du
le
8
P
a
ram
et
e
rs
3.7.1 BIN (Binary Code)
(1) Binary code
Binary date is represented by 0 (OFF) and 1 (ON).
Decimal notation uses the numerals 0 through 9. When counting beyond 9, a 1 is
placed in the 10s column and a 0 is placed in the 1s column to make the number 10.
In binary notation, the numerals 0 and 1 are used. A carry occurs after 1 and the
number becomes 10 (decimal 2).
Table3.4 shows the numerical notation by BIN and DEC.
(2) Binary numeric expression
(a) Bit configuration in BIN notation used in CPU module
Each CPU module register (data registers, link registers, etc.) consists of 16 bits.
(b) Numeric data available for CPU module
Each CPU module register can store numeric values of -32768 to 32767.
Diagram 3.11 shows the numeric notation for CPU module registers.
POINT
To each bit of each register, a 2
n
value is assigned.
Note that the most significant bit is used for distinction of sign (positive or
negative).
1) When most significant bit is "0"...Positive
2) When most significant bit is "1"...Negative
Table3.4 Comparison between Binary and Decimal Notations
DEC (Decimal)
BIN (Binary)
0
0000
1
0001
2
0010
3
0011
4
0100
5
0101
6
0110
7
0111
8
1000
9
1001
10
1010
11
1011
Diagram 3.11 Numeric Expressions for CPU module Registers
Carry
Carry
Carry
Most significant bit (for positive/negative discrimination)
b15
8192
Bit name
Decimal value
Negative value" when most significant bit is "1".
16384
4096 2048 1024 512
256
128
64
32
16
8
4
2
1
-32768
2
15
2
14
2
13
2
12
2
11
2
10
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Содержание MELSEC QS Series
Страница 1: ......
Страница 2: ......
Страница 24: ...A 22 Memo ...
Страница 258: ...Index 3 Memo ...
Страница 263: ......
Страница 264: ......