Bin (Binary Code); Appendix 4.1 - Mitsubishi Electric MELSEC-Q00U(J)CPU User Manual

Table of Contents

Advertisement

Appendix 4.1

(1) Definition
Binary is a numeral system that represents numeric values using two symbols, 0 (off) and 1 (on).
Decimal notation uses the symbols 0 through 9. When the symbols for the first digit are exhausted (a digit
reaches 9), the next-higher digit (to the left) is incremented, and counting starts over at 0.
In binary notation, only the symbols 0 and 1 are used. After a digit reaches 1, an increment resets it to 0 and the
next digit (to the left) is incremented. (The numeric value becomes 10, which is equal to 2 in decimal.)
The following table lists the numeric representations in BIN and DEC.
(2) Numeric representation in BIN
(a) Bit configuration of BIN used in the CPU module
Each register (such as the data register, link register) in the CPU module consists of 16 bits.
(b) Numeric data available in the CPU module
Each register in the CPU module can store numeric values in the range of -32768 to 32767.
The following figure shows the numeric representations for registers.
Bit name
Decimal value
A numeric value of 2
Note that an unsigned binary number (0 to 65535) cannot be used in the most significant bit position since the most
significant bit is a sign bit.
• The most significant bit is "0"...Positive
• The most significant bit is "1"...Negative
494

BIN (Binary Code)

DEC (Decimal)
0
1
2
3
4
5
6
7
8
9
10
11
Most significant bit (sign bit)
b15
b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
15
14
13
12
11
2
2
2
2
2
2
-32768
16384
8192
4096 2048 1024 512 256 128
A value will be negative value when the most significant bit is "1".
n
is assigned for each bit of registers.
BIN (Binary)
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
10
9
8
7
6
5
4
2
2
2
2
2
2
64
32
16
Carry
Carry
Carry
3
2
1
0
2
2
2
2
8
4
2
1

Advertisement

Table of Contents
loading

Table of Contents