SPL Basic Expression - Shift operation (<< , >>)


1. Left shift (<<) operation
  1. You can apply "<<" operation as follows.

      
    clear
    
    a1 = 0x0012
    b1 = 8
    c1 = a1 << b1
    print "c1 = " + Util.UShortToHex(c1)
    
      
 


  • Executed result is as follows.




  • 2. Right shift (>>) operation
    1. You can apply ">>" operation as follows.

        
      clear
      
      a1 = 0x3412
      b1 = 8
      c1 = a1 >> b1
      print "c1 = " + Util.UShortToHex(c1)
      
        


    2. Executed result is as follows.