19 lines
720 B
Text
19 lines
720 B
Text
julia> beeswax("Bitops.bswx",0,0.0,Int(20000))
|
|
i9223653511831486512
|
|
i48
|
|
|
|
9223653511831486512 AND 48 = 48
|
|
9223653511831486512 OR 48 = 9223653511831486512
|
|
9223653511831486512 XOR 48 = 9223653511831486464
|
|
NOT 9223653511831486512 = 9223090561878065103
|
|
9223653511831486512 << 48 = 13510798882111488
|
|
9223653511831486512 >>> 48 = 32769 (logical shift right)
|
|
9223653511831486512 ROL 48 = 13651540665434112
|
|
9223653511831486512 ROR 48 = 3178497
|
|
|
|
Arithmetic shift right is not originally implemented in beeswax.
|
|
|
|
But technically, ASR for negative numbers can be realized by negation,
|
|
logical shift right, and negating the result again:
|
|
|
|
-9223090561878065104 >> 48 = -32767 , interpreted as (negative) signed Int64 number (MSB=1)
|