3
- 17
3.7 Numeric Values which can be Used in Sequence Programs
3.7.2 HEX (Hexadecimal)
3
SEQUENCE PROGRAM EXECUTION
3.7.2 HEX (Hexadecimal)
(1) Hexadecimal notation
In hexadecimal notation, 4 binary bits are expressed in 1 digit.
If 4 binary bits are used in binary notation, 16 different values from 0 to 15 can be
represented.
Since hexadecimal notation represents 0 to 15 in 1 digit, letters A
H
to F
H
are used to
represent the numbers 10 to 15.
Then, a carry occurs after F
H
.
Table3.5 shows the numeric expressions of BIN, HEX and DEC (decimal).
(2) Hexadecimal numeric expression
CPU module registers (data registers, link registers, etc.) consist of 16 bits.
For 16 bits, 0 to FFFF
H
can be specified in hexadecimal.
POINT
The CPU module regards data stored in HEX as BIN.
For example, if FFFF
H
is stored into a register in HEX, the CPU module performs
operation, regarding the value of a register as -1.
Table3.5 Comparison of BIN, HEX, and DEC Numeric Expressions
DEC (Decimal)
HEX (Hexadecimal)
BIN (Binary)
0
0
0
1
1
1
2
2
10
3
3
11
•
•
•
•
•
•
•
•
•
9
9
1001
10
A
1010
11
B
1011
12
C
1100
13
D
1101
14
E
1110
15
F
1111
16
10
1 0000
17
11
1 0001
•
•
•
•
•
•
•
•
•
47
2F
10 1111
Carry
Содержание MELSEC QS Series
Страница 1: ......
Страница 2: ......
Страница 24: ...A 22 Memo ...
Страница 258: ...Index 3 Memo ...
Страница 263: ......
Страница 264: ......