 |
ALPHA-VISION® Functions: aci.Rsh
|
aci.Rsh
SUMMARY
Bit by bit shift right without considering the algebraic sign.
SYNTAX
aci.Rsh(
<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.Rsh(0x12345678, 4) == 0x01234567)
assert(aci.Rsh(0xffffffff, 1) == 0x7fffffff)
assert(aci.Rsh(0x00000001, 1) == 0)
assert(aci.Rsh(0x00010000, 1) == 0x00008000)
assert(aci.Rsh(0x80000000, 31) == 0x00000001)
assert(aci.Rsh(0x80000000, 32) == 0x80000000)
assert(aci.Rsh(0x80000000, 48) == 0x00008000)
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