1 bin (binary code), Bin (binary code) – MITSUBISHI ELECTRIC 700 Series User Manual

Page 78

Advertising
background image

73

Numerical Values Usable in Sequence Program

3

SEQUENCE PRO

G

RAM

M

ING

3.8.1

BIN (Binary Code)

(1) Binary code

BIN is a numerical value represented by 0s (OFF) and 1s (ON).
In the decimal code, a number is incremented from 0 to 9, and at this point, a
carry occurs and the number is incremented to 10.
In BIN, 0, 1 are followed by a carry, and the number is incremented to 10 (2 in
decimal).
Table 2.2 indicates the numerical representations of BIN and decimal code.

Table 3.2 Differences between Numerical

Representations of BIN and Decimal Code

(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

n

value.

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. 2.8.

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. 2.8, values can be represented in

DEC (Decimal Code)

BIN (Binary Code)

0

0000

1

0001

2

0010

3

0011

4

0100

5

0101

6

0110

7

0111

8

1000

9

1001

10

1010

11

1011

Carry

Carry

Carry

Value is negative if most significant bit is 1.

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0

Most significant bit (for judgment of positive/negative)

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

2

15

16384 8192 4096 2048 1024

512 256 128 64

32

16

8

4

2

1

-32768

Bit name

Decimal value

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

Advertising