Number Conversion Instructions (Accumulator) - Automationdirect.com DirectLOGIC DL205 Series User Manual

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Number Conversion

Number Conversion Instructions (Accumulator)

1
Binary (BIN)
2
The Binary instruction converts a BCD value in the
230
accumulator to the equivalent binary value. The result resides
240
in the accumulator.
3
250-1
In the following example, when X1 is on, the value in V2000 and V2001 is loaded into the
260
accumulator using the Load Double instruction. The BCD value in the accumulator is
4
converted to the binary (HEX) equivalent using the BIN instruction. The binary value in the
accumulator is copied to V2010 and V2011 using the Out Double instruction. (The
DS
Used
5
handheld programmer will display the binary value in V2010 and V2011 as a HEX value.)
HPP Used
6
DirectSOFT
X1
7
8
9
10
11
12
13
14
Copy the binary data in the
accumulator to V2010 and V2011
A
B
C
D
5–130
DL205 User Manual, 4th Edition, Rev. B
LDD
V2000
Load the value in V2000 and
V2001 into the accumulator
Acc.
BIN
Convert the BCD value in
Acc.
the accumulator to the
binary equivalent value
OUTD
V2010
Handheld Programmer Keystrokes
$
STR
SHFT
SHFT
GX
OUT
8 4
2
1
8
4 2
1
8
4
2 1
0 0
0
0
0
0 0
0
0
0
0 0
28529 = 16384 + 8192 + 2048 + 1024 + 512 + 256 + 64 + 32 + 16 + 1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0
0 0
0
0
0
0 0
0
0
0
2
1
5
2
1
6
3
1
8
4
2
1
0
3
6
3
7
3
6
3
1
0
4
7
6
8
4
1
5
7
8
9
9
7
3
8
4
2
0
5
7
8
4
7
4
7
7
3
1
8
4
7
6
3
1
4
4
0
5
7
8
4
2
0
0
5
8
1
9
4
7
6
3
1
8
4
2
3
8
1
5
2
4
2
6
6
2
2
6
8
4
4
8
B
ENT
1
L
D
D
C
ANDST
3
3
2
B
I
N
ENT
1
8
TMR
D
C
A
SHFT
3
2
0
BIN
V2001
V2000
0
0
0
2
8
5
2
9
8
4
2
1
8 4
2
1
8
4 2
1
0
0
1
0
1 0
0
0
0
1 0
1
BCD Value
Binary Equivalent Value
15 14 13 12 11 10 9 8
0 0
0
0
0
0
1 1
0
1
1
1 1
1
5
2
1
6
3
1
8
4
2
1
5
2
0
2
6
3
5
2
6
1
0
0
0
1
5
4
4
2
1
5
7
3
9
9
4
2
2
6
8
2
1
0
3
6
8
2
6
8
4
5
8
4
7
6
8
4
7
8
4
2
6
The Binary (HEX)
0
0
0
0
6
F
7
1
value copied to
V2010
V2011
V2010
A
A
A
ENT
0
0
0
B
A
ENT
1
0
8
4
2 1
8
4
2
1
0
0
1 0
1
0
0
1
7
6 5
4 3
2
1
0
0
1
1
1 0
0
0
1
1
6
3
1
8
4
2
1
2
4
2
6
8

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Table of Contents

Save PDF