212
The following program converts three digits of data from LR 20 to bit positions
and turns ON the corresponding bits in three consecutive words starting with
HR 10.
00000
MLPX(76)
DM 0020
#0021
HR 10
Address Instruction Operands
00000 LD 00000
00001 MLPX(76)
LR 20
# 0021
HR 10
S: LR 20 R: HR 10 R+1: HR 11 R+2: HR 12
DM 00 2
0
HR 1000 0 HR 1100 0 HR 1200 1
DM 01 2
1
HR 1001 0 HR 1101 0 HR 1201 0
DM 02 2
2
HR 1002 0 HR 1102 0 HR 1202 0
DM 03 2
3
HR 1003 0 HR 1103 0 HR 1203 0
DM 04 1 2
0
HR 1004 0 HR 1104 0 HR 1204 0
DM 05 1 2
1
1 HR 1005 0 HR 1105 0 HR 1205 0
DM 06 1 2
2
HR 1006 0 HR 1106 1 HR 1206 0
DM 07 1 2
3
HR 1007 0 HR 1107 0 HR 1207 0
DM 08 0 2
0
HR 1008 0 HR 1108 0 HR 1208 0
DM 09 1 2
1
2 HR 1009 0 HR 1109 0 HR 1209 0
DM 10 1 2
2
HR 1010 0 HR 1110 0 HR 1210 0
DM 11 0 2
3
HR 1011 0 HR 1111 0 HR 1211 0
DM 12 0 2
0
HR 1012 0 HR 1112 0 HR 1212 0
DM 13 0 2
1
3 HR 1013 0 HR 1113 0 HR 1213 0
DM 14 0 2
2
HR 1014 0 HR 1114 0 HR 1214 0
DM 15 0 2
3
HR 1015 1 HR 1115 0 HR 1215 0
15
6
0
Not
Converted
5-18-8 16-TO-4/256-TO-8 ENCODER – DMPX(77)
S: First source word
IR, SR, AR, DM, HR, TC, LR
R: Result word
IR, SR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
C: Control Word
IR, SR, AR, DM, HR, TC, LR, #
DMPX(77)
S
R
C
@DMPX(77)
S
R
C
Limitations When the leftmost digit of C is 0, the rightmost two digits of C must each be be-
tween 0 and 3.
When the leftmost digit of C is 1, the rightmost two digits of C must each be be-
tween 0 and 1.
All source words must be in the same data area.
Description Depending on the value of C, MLPX(76) operates as a 16-bit to 4-bit encoder or
an 256-bit to 8-bit encoder.
Example:
4-bit to 16-bit Decoding
Data Conversion Section 5-18