Shift Right Logical Accumulator
Organizational graphic tag to help group instructions

Mnemonic

 SRA

Short and Long format of instruction



Description

The contents of the accumulator are shifted right, a bit at a time. Zeros (one for each right-shifted bit) are shifted into accumulator bit-position 0, regardless of the initial value of bit-position 0. Bits are shifted out of accumulator-position 15 and lost. An example of a right shift of two positions is:

Shift Right Accumulator example

The number of positions shifted is specified by a shift count. Location of the shift count is determined by the T bits in the instruction:

T Bits (6 and 7)   Shift Count Location
00   Low-order six bits of displacement (in the shift instruction)
01   Low-order six bits in index-register 1
10   Low-order six bits in index-register 2
11   Low-order six bits in index-register 3

A value must be put into the shift-count location before the operation is started. The operation is ended when the specified number of shifts have been performed. The shift count, however, need be set up only once. After the operation is ended, the original shift count (for example, a count in index-register 1) is the same as its initial value. (Decrementing of the count is performed in separate circuits.)

The maximum shift count that can be specified is 63 (111111 in binary). A right-shift of sixteen, however, puts zeros in all positions of the accumulator.

A shift count of zero (000000 in binary) causes this instruction to perform as a no-operation: contents of the accumulator remain unchanged.

Core storage is not addressed during execution of the shift-right-accumulator instruction.

Indicators: The carry and overflow indicators are not affected during execution of the SRA operation.


Examples

Shift Left Accumulator/No Operation

Assembler Language Coding Hexadecimal Value Description of Instruction
Label   Operation   F T    
21 25
 
27 30
  32 33   35..40..
    SRA         DISP 18*X Contents of A shift right the number of shift counts in DISP
    SRA     1     1900 Contents of A shift right the number of shift counts in XR1
    SRA     2     1A00 Contents of A shift right the number of shift counts in XR2
    SRA     3     1B00 Contents of A shift right the number of shift counts in XR3
* This hexadecimal digit can be 0, 1, 2, or 3 depending upon the desired shift count.

But wait, there's MORE...

Valid HTML 4.01 Transitional