3
SEQUENCE PROGRAM EXECUTION
3.7.2 HEX (Hexadecimal)
(1) Hexadecimal notation
(2) Hexadecimal numeric expression
3
- 17
3.7 Numeric Values which can be Used in Sequence Programs
3.7.2 HEX (Hexadecimal)
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
represent the numbers 10 to 15.
Then, a carry occurs after F
Table3.5 shows the numeric expressions of BIN, HEX and DEC (decimal).
Table3.5 Comparison of BIN, HEX, and DEC Numeric Expressions
DEC (Decimal)
HEX (Hexadecimal)
0
1
2
3
•
•
•
9
10
11
12
13
14
15
16
17
•
•
•
47
CPU module registers (data registers, link registers, etc.) consist of 16 bits.
For 16 bits, 0 to FFFF
H
POINT
The CPU module regards data stored in HEX as BIN.
For example, if FFFF
operation, regarding the value of a register as -1.
.
H
0
1
2
3
•
•
•
9
A
B
C
D
E
F
10
11
•
•
•
2F
can be specified in hexadecimal.
is stored into a register in HEX, the CPU module performs
H
to F
are used to
H
H
BIN (Binary)
0
1
10
11
•
•
•
1001
1010
1011
1100
1101
1110
1111
1 0000
1 0001
•
•
•
10 1111
Carry