SHL

Instruction: Shift value left by specified number of bits.

SHL Value, < # > Bits


Result: Value is shifted left by Bits.

  • Value (d-field) is the register to shift left.
  • Bits (s-field) is a register or a 5-bit literal whose value is the number of bits to shift left.

Opcode Table:

–INSTR–  ZCRI –CON–    –DEST–         –SRC–

Z Result

C Result

Result

Clocks

 001011    001i    1111    ddddddddd    sssssssss

Result = 0

D[31]

Written

4

Concise Truth Table:

In

Out

Destination

Source

Z

C

Effects

Destination

Z

C

$8765_4321; -2,023,406,815

$0000_0004; 4

-

-

wz wc

$7654_3210; 1,985,229,328

0

1

$7654_3210; 1,985,229,328

$0000_000C; 12

-

-

wz wc

$4321_0000; 1,126,236,160

0

0

$4321_0000; 1,126,236,160

$0000_0010; 16

-

-

wz wc

$0000_0000; 0

1

0

Explanation

SHL (Shift Left) shifts Value left by Bits places and sets the new LSBs to 0.

If the WZ effect is specified, the Z flag is set (1) if the resulting Value equals zero. If the WC effect is specified, the C flag is set equal to Value's original bit 31. The result is written to Value unless the NR effect is specified.

Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.