1. Bit left offset SHLB
1. Bit left offset SHLB
1.1. nstruction Description
The instruction shifts the operand (S) left by (N2) bits into the operand (D) of length (N1). N2 ≤ N1 ≤ Maximum length of operand (D), where operand (S) specifies the lowest bit of its (N2) bit, and operand (D) is moved in from the highest bit of the (N2) bit specified by operand (S).
| instruction | SRC | DST | n1 | n2 |
|---|---|---|---|---|
| SHLB | Y0 | M0 | K8 | K2 |
1.1.1. the process of the instruction excute:
(1)M7,M6 → 移出
(2)M5,M4 → M7,M6
(3)M3,M2 → M5,M4
(4)M1,M0 → M3,M2
(5)Y1,Y0 → M1,M0
图1 the process of the instruction excute
1.2. The valid operands of the instruction
| Input/Output | Data Type | operand | Description |
|---|---|---|---|
| S | ON/OFF | X/Y/C/T/S/M, word positioning (D/V/Z) | address |
| D | ON/OFF | Y/C/T/S/M, word positioning (D/V/Z) | Source |
| N0 | 16 bit integer | D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) | length |
| N1 | 16 bit integer | D/CV/TV/AI/AO/K/H/V/Z/FD, bit composite word (X/Y/M/C/T/S), local variable (LW) | shift |
1.3. Example
Command table
NETWORK 000
LD X000
SHLB M0 Y0 K16 K1 // Move Y017 out, then move Y016 into Y017,..., and then move M0 into Y0
图2 SHLB