Bit Shifts
Chapter 14
145
Figure 14.3
BIT SHIFT LEFT Example Rung
BIT SHIFT SHIFT
COUNTER ADDR: 200
NUMBER OF BITS: 128
FILE: 400- 407
INPUT: 130/17
OUTPUT: 420/00
200
(EN)
17
200
(DN)
15
The Bit Shift Right output instruction constructs a synchronous bit shift
register from 1 to 999 bits in length . Figure 14.1B shows a 128-bit register
starting at words 400 and 407.
Upon false-true transition, bit B from a particular input word will be
inserted into the last bit of the bit shift register. In Figure 14.1B, bit 128
will move right and displace bit 127. Bit 127 will displace bit 126. Each bit
displaces the one on its right until the first bit in the word, 113 in word
407
8
, is reached. Bit 113 then replaces bit 112 status in word 406
8
. This
bumping procedure continues throughout the stack until bit 1 is ejected
from the file into a specified bit A in an output word.
If the shift bit register of Figure 14.1B had been 123 bits long it would
have ended at bit 12
8
of word 407
8
. In this case the bits to the left of 12
8
in
the word 407
8
would be unused and cannot be used for any other purpose.
A Bit Shift Right will shift the on or off status of bit B directly into bit 123
shown by the dotted line.
The instruction operates in the complete mode. The status of the input bit
is shifted into the last bit in the register and the status of the first bit in the
register is shifted into the output bit in one scan.
Instruction Overview:
Output instruction
Key sequence: [SHIFT REG] 13
Counter manipulated by instruction
Operates in complete mode
Requires 6 words of user program
14.2
Bit Shift Right
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com