Bitwise operations on integers #
Possibly only of archaeological significance.
Recursors #
Int.bitCasesOn: Parity disjunction. Something is true/defined onโคif it's true/defined for even and for odd values.
bit b appends the digit b to the binary representation of
its integer input.
Instances For
Int.natBitwise is an auxiliary definition for Int.bitwise.
Instances For
Int.bitwise applies the function f to pairs of bits in the same position in
the binary representations of its inputs.
Instances For
lnot flips all the bits in the binary representation of its input
Instances For
lor takes two integers and returns their bitwise or
Instances For
land takes two integers and returns their bitwise and
Instances For
ldiff a b performs bitwise set difference. For each corresponding
pair of bits taken as Booleans, say aแตข and bแตข, it applies the
Boolean operation aแตข โง ยฌbแตข to obtain the iแตสฐ bit of the result.
Instances For
m <<< n produces an integer whose binary representation
is obtained by left-shifting the binary representation of m by n places
m >>> n produces an integer whose binary representation
is obtained by right-shifting the binary representation of m by n places
bitwise ops #
Defines a function from โค conditionally, if it is defined for odd and even integers separately
using bit.
Instances For
Compare with Int.shiftRight_add, which doesn't have the coercions โ โ โค.
bitwise ops #
Connection of HShiftLeft Int Int Int and HShiftLeft Int Nat Int.
Connection of HShiftRight Int Int Int and HShiftRight Int Nat Int.
Compare with Int.zero_shiftLeft, which has n : โ.
Compare with Int.zero_shiftRight, which has n : โ.