Binary-coded decimal (BCD)
• The binary-coded decimal system uses a binary value to represent each digit of a decimal value.
The decimal value 157, for example, is expressed as follows.
•
• BCD is used for the following signals.
1) Output signals of digital switches
2) Signals of seven-element display (digital HMI)
0
1
2
3
4
5
6
7
8
9
1
2
5
1
0
← Digit number
← Decimal
7
(100)
0001
0101
0111
← Power of digit
← BCD
← Binary bit weight
(10)
(1)
1
2
4
8
1
842
1
4
8 2
8000
4000
2000
1000
800
400
200
100
80
40
20
10
8
4
2
0
0
1
1
1
1
4 digits
3 digits
2 digits
1 digit
0
0
0
0
0
0
1
0
0
1
1
1(0)
2(0)
4(0)
8(0)
COM
(1)
(0)
(0)
(0)
(0)
(1)
(0)
(0)
(1)
(1)
(0)
(0)
(0)
(0)
(1)
(0)
(1)
(0)
(1)
(0)
(0)
(1)
(1)
(0)
(1)
(1)
(0)
(1)
(0)
(0)
(0)
(1)
(1)
(0)
(0)
(1)
Numerical values used by the programmable controller
• Usually, 8 bits are called one byte, and 16 bits (two bytes) are called one word.
• Registers of each word device in the programmable controller consist of 16 bits.
• Data register (D)
• Current value of a timer (T)
• Current value of a counter (C)
• File register (R)
• Link register (W)
• Values in the following two ranges can be processed in 16 bits (one word).
1) 0 to 65535
2) -32768 to 0 to +32767
• The programmable controller uses the range 2).
0
0
0
1
1
1 byte
1 word (2 bytes)
1
1
1 bit
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
(Binary bit weight)
32768
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
D100
1
In BCD, decimal values of 0 to 9999 (the maximum 4-digit value) can be represented with 16 bits.
The following figure shows the weight of each bit in BCD.
BCD code digital switch
59
Summary of Contents for FX5U Series
Page 1: ...FX5U Training Manual ...