3
SEQUENCE PROGRAM EXECUTION
3.7 Numeric Values which can be Used in Sequence Programs
3.7.3 BCD (Binary Coded Decimal)
3
- 18
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.3 BCD (Binary Coded Decimal)
(1) BCD notation
BCD (binary coded decimal) is a numbering system in which one digit of DEC
(decimal) is expressed in BIN (binary).
Though it uses 4-bit representation like hexadecimal notation, it dose not use letters
A
H
to F
H
.
Table3.6 shows the numeric expressions of BIN, BCD and DEC.
(2) BCD numeric expression
CPU module registers (data registers, link registers, etc.) consist of 16 bits.
In case of 16 bits, 0 to 9999 can be specified in BCD.
POINT
The CPU module regards value stored in BCD as BIN.
For example, if 8000 is stored in BCD, the CPU module performs operation,
regarding the value as -32768.
When performing arithmetic operation between values stored in BCD and any
values in the CPU module, use the operation instruction of the BCD.
Table3.6 Comparison of BIN, BCD, and DEC Numeric Expressions
DEC (Decimal)
BIN (Binary)
BCD
(Binary Coded Decimal)
0
0000
0
1
0001
1
2
0010
10
3
0011
11
4
0100
100
5
0101
101
6
0110
110
7
0111
111
8
1000
1000
9
1001
1001
10
1010
1 0000
11
1011
1 0001
12
1100
1 0010
Carry
Содержание MELSEC QS Series
Страница 1: ......
Страница 2: ......
Страница 24: ...A 22 Memo ...
Страница 258: ...Index 3 Memo ...
Страница 263: ......
Страница 264: ......