Numerical values usable in sequence program
(2) Numerical representation of BIN
1) Each register (e.g. data register) of the built-in PLC function consist of 16 bits.
Each bit of the register is assigned a 2
However, the most significant bit is used to judge whether the value is positive
or negative.
• Most significant bit is 0 ..... Positive
• Most significant bit is 1 ..... Negative
The numerical representation of each register of the built-in PLC function is
shown in Fig. 3.9.
Bit name
Decimal value
Fig 3.9 Numerical Representation of Each Register of Built-in PLC Function
2) Numerical data usable with the built-in PLC function
In the numerical representation shown in Fig. 3.9, values can be represented in
the range -32768 to 32767.
Therefore, each register of the built-in PLC function can store any value
between -32768 and 32767.
80
Most significant bit (for judgment of positive/negative)
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
2
2
2
2
2
15
14
13
12
-32768
16384 8192 4096 2048 1024
Value is negative if most significant bit is 1.
n
value.
2
2
2
2
2
11
10
9
8
7
512 256 128 64
2
2
2
2
2
6
5
4
3
2
32
16
8
4
2
2
1
0
1