0x1::BitOperatorsFunctions for bit operations.
andorxornotlshiftrshift
andbit and: x & y
public fun and(x: u64, y: u64): u64
public fun and(x: u64, y: u64): u64 {
(x & y as u64)
}
or| bit or: x | y |
public fun or(x: u64, y: u64): u64
public fun or(x: u64, y: u64): u64 {
(x | y as u64)
}
xorbit xor: x ^ y
public fun xor(x: u64, y: u64): u64
public fun xor(x: u64, y: u64): u64 {
(x ^ y as u64)
}
notbit not: !x
public fun not(x: u64): u64
public fun not(x: u64): u64 {
(x ^ 18446744073709551615u64 as u64)
}
lshiftleft shift n bits.
public fun lshift(x: u64, n: u8): u64
public fun lshift(x: u64, n: u8): u64 {
(x << n as u64)
}
rshiftright shift n bits.
public fun rshift(x: u64, n: u8): u64
public fun rshift(x: u64, n: u8): u64 {
(x >> n as u64)
}
pragma verify = false;