-3 2 ,7 6 8〜32 ,7 67
-2 , 1 4 7 ,4 83 ,6 48 ~ 2 ,1 47 ,4 83 ,6 4 7
b0
16384+8192+4096+2048+1024+512+256+128+64+32+16+8+4+2+1=32767
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
b15
b31 b30 b29 b28
b27
b26 b25
b24
b23
b22 b21
b20 b19 b18
b17
b16 b15
b14
b13
b12 b11
b10 b9 b8
b7
b6 b5
b4
b3
b2 b1
b0
NB7 NB6 NB5 NB4 NB3 NB2 NB1 NB0
BY3 BY2 BY1 BY0
W1 W0
DW
4+1=5
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
0 0 0 0 0 0 0 0 0 0 0 0
1
0
1
–5
(Decimal system)
b0
1
b15
FFFBH
(Hexadecimal system)
1: Negative bias
1 1 1 1
0
1 1 1 1 1 1 1 1 1 1
0
1
b0
0
1 1 1 1 1 1 1 1 1 1 1 1 1 1
b14
2's complement
invert each bit (0 → 1; 1 → 0)
0 0 0 0 0 0 0 0 0 0 0 0 0
+1
39
2-13 Numerical System
The value in PLC is operated and stored used the binary system. The binary number and relative
terminology are given as follows:
Bit: the basic of the binary number, each value of a Bit must be either “0” or “1”.
Nibble: composed of 4 sequential bits.
For example, b3 ~ b0 can express an one-Nibble hex value: 0 ~ F.
Byte: composed of 8 sequential bits.
For example, b7 ~ b0 can express a two-Nibble hex value: 00 ~ FF.
Word: composed of 2 sequential bytes or 16 sequential bits.
For example, b15 ~ b0 can express a four-Nibble hex value: 0000 ~ FFFF.
Double Word: composed of 2 sequential words, 4 sequential bytes or 32 sequential bits.
For example, b31 ~ b0 can express an eight-Nibble hex value: 00000000 ~ FFFFFFFF.
The relations between every binary Bit, Nibble, Byte, Word and Double Word:
(1) Binary Number (BIN)
Double Word
Word
Bit
Nibble
Byte
Expression of the value
For Word (16 bits) or Double Word (32 bits), the Most Significant Bit (MSB), e.g. The b15 of a
Word or the b31 of a Double Word, gives the value positive or negative bias, where “0” for
positive and “1” for negative. The rest bits, e.g. b14~b0 or b30 ~ b0, express the value size.
It is a 16-bit value shows below.
0: positive bias
7FFFH
(Hexadecimal system)
32767
(Decimal system)
16 bits
32 bits
⑧
Range of the value
The maximum range of the value expressed by 16 bits and 32 bits: