 |
ALPHA-VISION® Functions: aci.Lsh
|
aci.Lsh
SUMMARY
Bit by bit shift left.
SYNTAX
aci.Lsh(
<value>,
<shift>)
ARGUMENTS
- value (type:integer)
-
The number to be shifted
- shift (type:integer)
-
The number of bit positions for the shift operation.
RETURN VALUES
- 1 (type:integer)
-
Returns the result of the shift operation.
EXAMPLES
assert(aci.Lsh(0x12345678, 4) == 0x23456780)
assert(aci.Lsh(0xffffffff, 1) == 0xfffffffe)
assert(aci.Lsh(0x80000000, 1) == 0)
assert(aci.Lsh(0x00008000, 1) == 0x00010000)
assert(aci.Lsh(0x00000001, 31) == 0x80000000)
assert(aci.Lsh(0x00000001, 32) == 0x00000001)
assert(aci.Lsh(0x00000001, 33) == 0x00000002)
Syntax Notation
- [aaa]
- aaa is optional (zero or one occurences)
- (aaa|bbb)
- aaa exclusive or bbb
- (aaa)*
- aaa may occur indefinitely often or may be omitted
- (aaa)+
- aaa may occur indefinitely often but at least once
- (aaa)m..n
- aaa may occur from m to n times