User Tools

Site Tools


en-us_products:mpino_studio2:box_functions:bit_operations:shl

SHL Box Function

Shift Left

Category: Bitwise Operation Box Functions

Behavior

Shifts a WORD left and stores the result. Bits leaving the left are discarded and zeros fill from the right. Use a shift count from 0 to 15.

Syntax and Arguments

Syntax: SHL D0 2 D1

  • 1st = source: integer WORD address
  • 2nd = shift count: 0 to 15
  • 3rd = destination: result address

Behavior Example

Run condition Before Command entered Expected result
Left condition ON D0=0x0003 SHL D0 2 D1 D1=0x000C

Inputs and results for Bitwise Operation Box Functions

Cautions

  • The operation applies to all 16 bits of the WORD.
  • Use a shift count from 0 to 15. Bits shifted out on the left are discarded.

Box Functions in the Same Category

en-us_products/mpino_studio2/box_functions/bit_operations/shl.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki