Title here
Summary here
Right shifts a given number.
Parameters
number
: the number to shiftshift
: shifting to doReturn value Number
Author
Example
(import bitwise)
(print (bitwise:rshift 4096 3)) # 512
Left shifts a given number.
Parameters
number
: the number to shiftshift
: shifting to doReturn value Number
Author
Example
(import bitwise)
(print (bitwise:lshift 512 3)) # 4096
Xor a number given a mask.
Parameters
number
: the number to xormask
: the mask as a numberReturn value Number
Author
Example
(import bitwise)
(print (bitwise:xor 99 13)) # 110
Compute the bitwise a OR b
operation.
Parameters
a
: first numberb
: second numberReturn value Number
Author
Example
(import bitwise)
(print (bitwise:or 89 13)) # 93
Compute the bitwise a AND b
operation.
Parameters
a
: first numberb
: second numberReturn value Number
Author
Example
(import bitwise)
(print (bitwise:and 89 13)) # 9