![Omron CVM1D Operation Manual Download Page 35](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532035.webp)
29
When referring to the entire word, the digit numbered 0 is called the rightmost
digit; the one numbered 3, the leftmost digit.
When inputting data, it must be input in the proper form for the intended purpose.
This is no problem when designating bits, which are turned ON (equivalent to a
binary value of 1) or OFF (a binary value of 0). When inputting word data, howev-
er, it is important to input it either as decimal or as hexadecimal, depending on
what is called for by the instruction it is to be used for. Section 5 Instruction Set
specifies when a particular form of data is required for an instruction.
Binary and hexadecimal can be easily converted back and forth because each
four bits of a binary number is numerically equivalent to one digit of a hexadeci-
mal number. The binary number 0101111101011111 is converted to hexadeci-
mal by considering each set of four bits in order from the right. Binary 1111 is
hexadecimal F; binary 0101 is hexadecimal 5. The hexadecimal equivalent
would thus be 5F5F, or 24,415 in decimal (16
3
x 5 + 16
2
x 15 + 16 x 5 + 15).
Decimal and BCD are easily converted back and forth. In this case, each BCD
digit (i.e., each group of four BCD bits) is numerically equivalent to the corre-
sponding decimal digit. The BCD bits 0101011101010111 are converted to deci-
mal by considering each four bits from the right. Binary 0101 is decimal 5; binary
0111 is decimal 7. The decimal equivalent would thus be 5,757. Note that this is
not the same numeric value as the hexadecimal equivalent of
0101011101010111, which would be 5,757 hexadecimal, or 22,359 in decimal
(16
3
x 5 + 16
2
x 7 + 16 x 5 + 7).
Because the numeric equivalent of each four BCD binary bits must be numeri-
cally equivalent to a decimal value, any four bit combination numerically greater
than 9 cannot be used, e.g., 1011 is not allowed because it is numerically equiva-
lent to 11, which cannot be expressed as a single digit in decimal notation. The
binary bits 1011 are of course allowed in hexadecimal and are equivalent to the
hexadecimal digit B.
There are instructions provided to convert data between BCD and hexadecimal.
Refer to 5-15 Data Conversion for details. Tables of binary equivalents to hexa-
decimal and BCD digits are provided in the appendices for reference.
Decimal points are used in timers only. The least significant digit represents
tenths of a second. All arithmetic instructions operate on integers only. When
inputting data for use by Special I/O Units or other special applications, be sure
to check on the type of data required for the application.
Signed and Unsigned Data
This section explains signed and unsigned binary data formats. Three instruc-
tions, MAX(165), MIN(166), and SUM(167), can use either signed or unsigned
data.
Unsigned binary is the standard format used in OMRON PCs. Data in this manu-
al are unsigned unless otherwise stated. Unsigned binary values are always
positive and range from 0 ($0000) to 65,535 ($FFFF). Eight-digit values range
from 0 ($0000 0000) to 4,294,967,295 ($FFFF FFFF).
Bit number
Contents
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
15
14
13
12
11
10
09
08
07
06
05
04
03
02
01
00
Digit value
16
3
16
2
16
1
16
0
Converting Different Forms
of Data
Decimal Points
Unsigned binary
Data Area Structure
Section 3-2
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...