Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 389 Bytes

1496-language-lshift.markdown

File metadata and controls

21 lines (15 loc) · 389 Bytes

LSHIFT

result = x LSHIFT n

Performs a bitwise operation that shifts all the bits of x to the left by an amount of n.

Example 1:

print 1 lshift 2 ' Output 4 

Example 2:

x = 1 print bin(x) ' Output: 1 print bin(x lshift 1) ' Output: 10 print bin(x lshift 2) ' Output: 100 print bin(x lshift 3) ' Output: 1000 
close